summaryrefslogtreecommitdiff
path: root/dh_movefiles
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:41:39 +0000
committerjoey <joey>1999-08-17 04:41:39 +0000
commit7a30f8fe31c507e7e3f75e11e27617e3f33da808 (patch)
treeddc1884ab28bb4f9ba12ebadaad3acd40cbee70e /dh_movefiles
parent1e6dea44772a0c1f57e7cd50ff12e35a1cff0b96 (diff)
r46: Initial revision
Diffstat (limited to 'dh_movefiles')
-rwxr-xr-xdh_movefiles27
1 files changed, 27 insertions, 0 deletions
diff --git a/dh_movefiles b/dh_movefiles
new file mode 100755
index 0000000..9190853
--- /dev/null
+++ b/dh_movefiles
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+#
+# Move files out of debian/tmp, into subpackages.
+
+PATH=debian:$PATH:/usr/lib/debhelper
+. dh_lib
+
+for PACKAGE in $DH_DOPACKAGES; do
+ TMP=`tmpdir $PACKAGE`
+ files=`pkgfile $PACKAGE files`
+
+ move=""
+
+ # debian/files has a different purpose, so ignore it.
+ if [ "$files" -a "$files" != "debian/files" ]; then
+ if [ "$PACKAGE" = "$MAINPACKAGE" ]; then
+ error "I was asked to move some files from $PACKAGE into itself."
+ fi
+
+ if [ ! -d "$TMP" ]; then
+ doit "install -d $TMP"
+ fi
+
+ files=`pwd`/$files
+ complex_doit "(cd debian/tmp;tar --create --remove-files --file - "`cat $files`") | (cd $TMP;tar xpf -)"
+ fi
+done