git.samba.org
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mention updated config files.
[rsync.git]
/
maybe-make-man
diff --git
a/maybe-make-man
b/maybe-make-man
index b7f0a9f1a4814a210a32cbfcbd3f5ec5a605cc3f..c7af73934a775ed0f983f988697a16c81e9cfea6 100755
(executable)
--- a/
maybe-make-man
+++ b/
maybe-make-man
@@
-1,22
+1,18
@@
#!/bin/sh
#!/bin/sh
-if [
x"$2" = x
]; then
- echo "Usage: $0
SRC_DIR
NAME.NUM.md" 1>&2
+if [
$# != 1
]; then
+ echo "Usage: $0 NAME.NUM.md" 1>&2
exit 1
fi
exit 1
fi
-
srcdir
="$1"
-inname="$2"
+
inname
="$1"
+srcdir=`dirname "$0"`
flagfile="$srcdir/.md2man-works"
flagfile="$srcdir/.md2man-works"
-
-if [ ! -d "$srcdir" ]; then
- echo "The specified SRC_DIR is not a directory: $srcdir" 1>&2
- exit 1
-fi
+force_flagfile="$srcdir/.md2man-force"
if [ ! -f "$flagfile" ]; then
# We test our smallest manpage just to see if the python setup works.
if [ ! -f "$flagfile" ]; then
# We test our smallest manpage just to see if the python setup works.
- if "$srcdir/md
2man
" --test "$srcdir/rsync-ssl.1.md" >/dev/null 2>&1; then
+ if "$srcdir/md
-convert
" --test "$srcdir/rsync-ssl.1.md" >/dev/null 2>&1; then
touch $flagfile
else
outname=`echo "$inname" | sed 's/\.md$//'`
touch $flagfile
else
outname=`echo "$inname" | sed 's/\.md$//'`
@@
-37,4
+33,10
@@
if [ ! -f "$flagfile" ]; then
fi
fi
fi
fi
-"$srcdir/md2man" "$srcdir/$inname"
+if [ -f "$force_flagfile" ]; then
+ opt='--force-link-text'
+else
+ opt=''
+fi
+
+"$srcdir/md-convert" $opt "$srcdir/$inname"