Fri, 22 Nov 2019 16:02:17 -0600
Fix extra args to Ag
756 | 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 |