Download raw body.
got-www: don't hardcode directory in sync-man.sh
On 2024/08/19 16:44:50 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> On Mon, Aug 19, 2024 at 04:35:41PM +0200, Omar Polo wrote:
> > this adds a -w to sync-man.sh so that it's possible to point the script
> > at different worktree. (fwiw i have my main checkout in ~/w/got)
> >
> > ok?
>
> sure, ok
last thing, I've added -e at the top so it stops at the first error
instead of trying to go on (which happens easily on typos), but also
felt the temptations to save some lines :)
diff /home/op/w/got-www
commit - 3aab66ae6812bcb4f9b957e2d2df929b5e3dbea8
path + /home/op/w/got-www
blob - f73c3e8bd5ce43f33dd294816f357e21426567f6
file + sync-man.sh
--- sync-man.sh
+++ sync-man.sh
@@ -9,21 +9,17 @@ while getopts w: name; do
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 "$workdir"/got/$f > ./${f}.html
+for f in \
+ got/got.1 got/got-worktree.5 got/git-repository.5 got/got.conf.5 \
+ gotadmin/gotadmin.1 \
+ tog/tog.1 \
+ gotwebd/gotwebd.8 gotwebd/gotwebd.conf.5 \
+ gotd/gotd.8 gotd/gotd.conf.5 \
+ gotsh/gotsh.1 \
+ gotctl/gotctl.8 \
+ gitwrapper/gitwrapper.1 \
+ ; do
+ mandoc -T html -O style=mandoc.css "$workdir/$f" > ./${f##*/}.html
done
-$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 "$workdir"/gotwebd/$f > ./${f}.html
-done
-for f in gotd.8 gotd.conf.5; do
- $CONVERT "$workdir"/gotd/$f > ./${f}.html
-done
-$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
got-www: don't hardcode directory in sync-man.sh