3 # Passed a list of undocumented man pages, generates symlinks to
4 # undocumented.7.gz for those man pages.
6 # Also, it looks for debian/undocumented files for more lists of
7 # undocumented man pages.
9 BEGIN { push @INC, "debian", "/usr/share/debhelper" }
13 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
14 $TMP=tmpdir($PACKAGE);
15 $undocumented=pkgfile($PACKAGE,"undocumented");
19 @undoc=filearray($undocumented);
22 if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
26 foreach $file (@undoc) {
27 $file=~s/.gz$//; # .gz extention is optional in input.
29 # Determine what directory the file belongs in,
30 # /usr/share/man, or /usr/X11R6/man, and how the link to
31 # the undocuemtned.7 man page will look.
32 ($section)=$file=~m/^.*\.(\d)/;
34 error("\"$file\" does not have an extention.");
36 if ($file=~/.*\.\dx/) {
37 $dir="usr/X11R6/man/man$section";
38 $reldir="../../../man/man7/";
40 elsif ($section != 7) {
41 $dir="usr/share/man/man$section";
45 $dir="usr/share/man/man$section";
49 if (! -d "$TMP/$dir") {
50 doit("install","-d","$TMP/$dir");
52 doit("ln","-sf","${reldir}undocumented.7.gz","$TMP/$dir/$file.gz");