summaryrefslogtreecommitdiff
path: root/dh_installmanpages
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:21:03 +0000
committerjoey <joey>1999-08-17 04:21:03 +0000
commit7511571c6481101f17f9858357e62d133a8dcb1a (patch)
tree8d0f7bb4acf149bc2f85f7151877d4b73e1271ed /dh_installmanpages
parent0495115e6ef5c603dfedae1a918690b078ffff9c (diff)
parentecff4e2941eefd33c368be7a0ee372406a6d0e94 (diff)
downloaddebhelper-7511571c6481101f17f9858357e62d133a8dcb1a.tar.gz
r4: Initial Import
Diffstat (limited to 'dh_installmanpages')
-rwxr-xr-xdh_installmanpages40
1 files changed, 27 insertions, 13 deletions
diff --git a/dh_installmanpages b/dh_installmanpages
index 9dbf1c93..7ee35a90 100755
--- a/dh_installmanpages
+++ b/dh_installmanpages
@@ -1,16 +1,19 @@
#!/bin/sh -e
#
-# Automatically find and install man pages.
+# Automatically find and install man pages. However, do not install any man
+# pages listed on the command line.
# This is a little bit DWIMish, but still very handy.
PATH=debian:$PATH:/usr/lib/debhelper
source dh_lib
-# Note: this was mostly copied from debstd, and not verified to work.
-# Find all filenames that look like man pages.
-for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in"`; do
- # Make sure they arn't alreadt in debian/tmp
- if ! expr $file : 'debian/tmp/.*' >/dev/null; then
+for PACKAGE in $DH_DOPACKAGES; do
+ TMP=`tmpdir $PACKAGE`
+
+ # Find all filenames that look like man pages.
+ # .ex files are examples installed by deb-make, we don't want those, or
+ # .in files, which are from configure.
+ for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in" | grep -v ^debian/$TMP`; do
# Make sure file thinks they are man pages.
if file $file|grep -q roff; then
if echo $file|grep -q /; then
@@ -18,14 +21,25 @@ for file in `find * -name "*.[1-9]*" ! -name "*.ex" ! -name "*.in"`; do
else
NAME=$file
fi
- SECTION=man`expr $NAME : '.*\.\([123456789]\)'`
- if [ ! -e debian/tmp/usr/man/$SECTION/$NAME -a \
- ! -e debian/tmp/usr/X11*/man/$SECTION/$NAME ]; then
- if [ ! -d debian/tmp/usr/man/$SECTION ]; then
- doit "install -d debian/tmp/usr/man/$SECTION"
+ # Look at the command line and check if we should
+ # install the file.
+ install=1
+ for notinstall in $@; do
+ if [ "$NAME" = "$notinstall" -o \
+ "$file" = "$notinstall" ]; then
+ install=""
+ fi
+ done
+ if [ "$install" ]; then
+ SECTION=man`expr $NAME : '.*\.\([123456789]\)'`
+ if [ ! -e debian/$TMP/usr/man/$SECTION/$NAME -a \
+ ! -e debian/$TMP/usr/X11*/man/$SECTION/$NAME ]; then
+ if [ ! -d debian/$TMP/usr/man/$SECTION ]; then
+ doit "install -d debian/$TMP/usr/man/$SECTION"
+ fi
+ doit "install -p -m644 $file debian/$TMP/usr/man/$SECTION/$NAME"
fi
- doit "install -p -m644 $file debian/tmp/usr/man/$SECTION/$NAME"
fi
fi
- fi
+ done
done