Debian Codegraph @

maybe-make-man

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 if [scip-shell system . . `[`. $# != 1 ]; then
4 echoscip-shell system . . echo. "Usage: $0 NAME.NUM.md" 1>&2
5 exit 1
6 fi
7
8 inname="$1"
9 srcdir=`dirnamescip-shell system . . dirname. "$0"`
10 flagfile="$srcdir/.md2man-works"
11 force_flagfile="$srcdir/.md2man-force"
12
13 if [scip-shell system . . `[`. ! -f "$flagfile" ]; then
14 # We test our smallest manpage just to see if the python setup works.
15 if "$srcdir/md-convert" --test "$srcdir/rsync-ssl.1.md" >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1; then
16 touchscip-shell system . . touch. $flagfile
17 else
18 outname=`basenamescip-shell system . . basename. "$inname" .md`
19 if [scip-shell system . . `[`. -f "$outname" ]; then
20 exit 0
21 elif [scip-shell system . . `[`. -f "$srcdir/$outname" ]; then
22 echoscip-shell system . . echo. "Copying $srcdir/$outname"
23 cpscip-shell system . . cp. -p "$srcdir/$outname" .
24 exit 0
25 else
•26 "$srcdir/md-convert" "$srcdir/$inname"
27 cpscip-shell system . . cp. -p "$srcdir/$outname" .
28 fi
29 fi
30 fi
31
32 if [scip-shell system . . `[`. -f "$force_flagfile" ]; then
33 opt='--force-link-text'
34 else
35 opt=''
36 fi
37
38 "$srcdir/md-convert" $opt "$srcdir/$inname"