3 # Passed a list of undocumented man pages, generates symlinks to
4 # undocumented.7 for those man pages.
6 # Also, it looks for debian/undocumented files for more lists of
7 # undocumented man pages.
9 PATH=debian:$PATH:/usr/lib/debhelper
12 for PACKAGE in $DH_DOPACKAGES; do
18 if [ -e debian/${EXT}undocumented ]; then
19 undoc=`tr "\n" " " < debian/${EXT}undocumented`
22 if [ "$PACKAGE" = "$MAINPACKAGE" -a "$*" ]; then
27 for file in $undoc; do
28 # Remove .gz extention from the filename, if present.
29 if [ `expr "$file" : '\(.*\).gz'` ]; then
30 file=`expr "$file" : '\(.*\).gz'`
33 # Determine what directory the file belongs in,
34 # /usr/man, or /usr/X11R6/man.
35 section=`expr "$file" : '.*\.\([123456789]\)'`
36 if [ `expr "$file" : '.*\.[123456789]\(x\)'` ] ; then
37 dir=usr/X11R6/man/man$section
40 dir=usr/man/man$section
44 if [ ! -d debian/$TMP/$dir ]; then
45 doit "install -d debian/$TMP/$dir"
48 doit ln -s $reldir/man7/undocumented.7.gz debian/$TMP/$dir/$file.gz