summaryrefslogtreecommitdiff
path: root/dh_installexamples
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:12:54 +0000
committerjoey <joey>1999-08-17 04:12:54 +0000
commit938b66ee19e113785e6655b1c3e73e9003e6464c (patch)
treed06bd22faa3da8940bec71ba2e34e2028b6e7764 /dh_installexamples
r1: Initial revision
Diffstat (limited to 'dh_installexamples')
-rwxr-xr-xdh_installexamples21
1 files changed, 21 insertions, 0 deletions
diff --git a/dh_installexamples b/dh_installexamples
new file mode 100755
index 0000000..7aec26e
--- /dev/null
+++ b/dh_installexamples
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+#
+# Reads debian/examples, installs all files listed there into
+# /usr/doc/$PACKAGE/examples
+
+PATH=debian:$PATH:/usr/lib/debhelper
+source dh_lib
+
+if [ -e debian/examples ]; then
+ examples=`cat debian/examples | tr "\n" " "`
+fi
+
+if [ "$examples" -o $@ ]; then
+ if [ ! -d debian/tmp/usr/doc/$PACKAGE/examples ]; then
+ doit "install -d debian/tmp/usr/doc/$PACKAGE/examples"
+ fi
+
+ for file in $examples $@; do
+ doit "cp -a $file debian/tmp/usr/doc/$PACKAGE/examples/"
+ done
+fi