Use documentation to extract 2 more .h lists
[rsync.git] / maybe-make-man
blobb7f0a9f1a4814a210a32cbfcbd3f5ec5a605cc3f
1 #!/bin/sh
3 if [ x"$2" = x ]; then
4 echo "Usage: $0 SRC_DIR NAME.NUM.md" 1>&2
5 exit 1
6 fi
8 srcdir="$1"
9 inname="$2"
10 flagfile="$srcdir/.md2man-works"
12 if [ ! -d "$srcdir" ]; then
13 echo "The specified SRC_DIR is not a directory: $srcdir" 1>&2
14 exit 1
17 if [ ! -f "$flagfile" ]; then
18 # We test our smallest manpage just to see if the python setup works.
19 if "$srcdir/md2man" --test "$srcdir/rsync-ssl.1.md" >/dev/null 2>&1; then
20 touch $flagfile
21 else
22 outname=`echo "$inname" | sed 's/\.md$//'`
23 if [ -f "$outname" ]; then
24 exit 0
25 elif [ -f "$srcdir/$outname" ]; then
26 echo "Copying $srcdir/$outname"
27 cp -p "$srcdir/$outname" .
28 exit 0
29 else
30 echo "ERROR: $outname cannot be created."
31 if [ -f "$HOME/build_farm/build_test.fns" ]; then
32 exit 0 # No exit errorno to avoid a build failure in the samba build farm
33 else
34 exit 1
40 "$srcdir/md2man" "$srcdir/$inname"