summaryrefslogtreecommitdiff
path: root/dh_installdocs
blob: 9481ec4e5dee35c9458a2d6a9a210797235b2003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e
#
# Reads debian/docs, and looks at files listed on command line, installs all 
# files listed there into /usr/doc/$PACKAGE
# Also installs the debian/copyright and debian/README.debian and debian/TODO

PATH=debian:$PATH:/usr/lib/debhelper
source dh_lib

if [ ! -d debian/tmp/usr/doc/$PACKAGE ]; then
	doit "install -d debian/tmp/usr/doc/$PACKAGE"
fi

if [ -e debian/docs ]; then
	docs=`cat debian/docs | tr "\n" " "`
fi

for file in $docs $@; do
	doit "cp -a $file debian/tmp/usr/doc/$PACKAGE/"
done

for file in copyright README.debian TODO ; do
	if [ -f debian/$file ]; then
		doit "install -m 644 -p debian/$file debian/tmp/usr/doc/$PACKAGE/"
	fi
done