commit - 67869be34391644621c19cb65f8174eace34670d
commit + 29a31cfb248d8f19c376a3e393e750b9bc38afab
blob - cde918dd3626cbf72f7bd01e001067bd4078f3c5
blob + 16eda29f66056f2ae940509cc5849b68e15c9878
--- sync-man.sh
+++ sync-man.sh
#!/bin/sh
+workdir="$HOME/src/got"
+
+while getopts w: name; do
+ case $name in
+ w) workdir="$OPTARG" ;;
+ ?) echo "Usage: $0 [-w workdir]" >&2; exit 1 ;;
+ esac
+done
+
CONVERT="mandoc -T html -O style=mandoc.css"
for f in got.1 got-worktree.5 git-repository.5 got.conf.5; do
- $CONVERT $HOME/src/got/got/$f > ./${f}.html
+ $CONVERT "$workdir"/got/$f > ./${f}.html
done
-$CONVERT $HOME/src/got/gotadmin/gotadmin.1 > ./gotadmin.1.html
-$CONVERT $HOME/src/got/tog/tog.1 > ./tog.1.html
+$CONVERT "$workdir"/gotadmin/gotadmin.1 > ./gotadmin.1.html
+$CONVERT "$workdir"/tog/tog.1 > ./tog.1.html
for f in gotwebd.8 gotwebd.conf.5; do
- $CONVERT $HOME/src/got/gotwebd/$f > ./${f}.html
+ $CONVERT "$workdir"/gotwebd/$f > ./${f}.html
done
for f in gotd.8 gotd.conf.5; do
- $CONVERT $HOME/src/got/gotd/$f > ./${f}.html
+ $CONVERT "$workdir"/gotd/$f > ./${f}.html
done
-$CONVERT $HOME/src/got/gotsh/gotsh.1 > ./gotsh.1.html
-$CONVERT $HOME/src/got/gotctl/gotctl.8 > ./gotctl.8.html
-$CONVERT $HOME/src/got/gitwrapper/gitwrapper.1 > ./gitwrapper.1.html
+$CONVERT "$workdir"/gotsh/gotsh.1 > ./gotsh.1.html
+$CONVERT "$workdir"/gotctl/gotctl.8 > ./gotctl.8.html
+$CONVERT "$workdir"/gitwrapper/gitwrapper.1 > ./gitwrapper.1.html
got st