os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/installManPage
Update contrib.
6 -s | --symlinks ) S="-s ";;
7 -z | --compress ) ZIP=$2; shift ;;
8 -e | --extension ) Z=$2; shift ;;
9 -s | --suffix ) SUFFIX=$2; shift ;;
14 if test "$#" != 2; then
15 echo "Usage: installManPages <options> file dir"
21 test -z "$S" && S="$DIR/"
23 # A sed script to parse the alternative names out of a man page.
25 # /^\\.SH NAME/{ ;# Look for a line, that starts with .SH NAME
26 # s/^.*$// ;# Delete the content of this line from the buffer
28 # s/,//g ;# Remove all commas ...
29 # s/\\\ //g ;# .. and backslash-escaped spaces.
30 # s/ \\\-.*// ;# Delete from \- to the end of line
31 # p ;# print the result
35 # Backslashes are trippled in the sed script, because it is in
36 # backticks which don't pass backslashes literally.
38 # Please keep the commented version above updated if you
39 # change anything to the script below.
51 SECTION=`echo $MANPAGE | sed 's/.*\(.\)$/\1/'`
52 SRCDIR=`dirname $MANPAGE`
56 if test -z "$FIRST" ; then
58 rm -f $DIR/$FIRST $DIR/$FIRST.*
59 sed -e "/man\.macros/r $SRCDIR/man.macros" -e "/man\.macros/d" \
60 $MANPAGE > $DIR/$FIRST
64 rm -f $DIR/$f $DIR/$f.*
65 ln $S$FIRST$Z $DIR/$f$Z