bin/setup-man

changeset 756
8bc91181db9d
equal deleted inserted replaced
755:60ee3259bc01 756:8bc91181db9d
1 #!/bin/sh
2 set -eu
3
4 cd $(hg root)
5
6 SOURCES="${@:-$(hg stat -Aqn -I 'bin/*')}"
7 MAN1=".man/man1"
8
9 mkdir -p $MAN1 || true
10
11 for SRC in $(grep -El '^=(head|cut)' $SOURCES); do
12 DST="${MAN1}/$(basename $SRC).1"
13 if [ ! -f $DST ] || [ "$SRC" -nt "$SRC" ]; then
14 pod2man -v --errors=stderr "$SRC" "$DST"
15 fi
16 done

mercurial