summaryrefslogtreecommitdiff
path: root/dh_movefiles
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 04:52:56 +0000
committerjoey <joey>1999-08-17 04:52:56 +0000
commit75c3ea7d270b1c29dcb78fcd56d75140aff76672 (patch)
treeed5dcf0ec1b24748827059206a3c8412b9dcae6d /dh_movefiles
parent45c35fdc6dc8a330bae1806f5e8b826fcc9d7e3f (diff)
downloaddebhelper-75c3ea7d270b1c29dcb78fcd56d75140aff76672.tar.gz
r92: Initial Import
Diffstat (limited to 'dh_movefiles')
-rwxr-xr-xdh_movefiles22
1 files changed, 10 insertions, 12 deletions
diff --git a/dh_movefiles b/dh_movefiles
index 8a365623..79dc0892 100755
--- a/dh_movefiles
+++ b/dh_movefiles
@@ -15,9 +15,9 @@ for PACKAGE in $DH_DOPACKAGES; do
# debian/files has a different purpose, so ignore it.
if [ "$files" -a "$files" != "debian/files" ]; then
- if [ "$TMP" = "debian/tmp" ]; then
- error "I was asked to move some files from debian/tmp to debian/tmp."
- fi
+# if [ "$TMP" = "debian/tmp" ]; then
+# error "I was asked to move some files from debian/tmp to debian/tmp."
+# fi
if [ ! -d "$TMP" ]; then
doit "install -d $TMP"
@@ -31,17 +31,15 @@ for PACKAGE in $DH_DOPACKAGES; do
#
# (The echo is in here to expand wildcards. Note that 'ls'
# won't work properly.)
- tomove=""
+ # The filelist is used, so even very weird filenames can be
+ # moved.
+ doit "rm -f movelist"
+ for i in `(cd debian/tmp ; echo \`cat $files\`)`; do
+ complex_doit "(cd debian/tmp ; find $i ! -type d -and ! -type l -print) >> movelist"
+ done
for i in `(cd debian/tmp ; echo \`cat $files\`)`; do
-tomove="`(cd debian/tmp ;\
-find $i ! -type d -and ! -type l -print)`\
-$tomove\
-`(cd debian/tmp ;\
-find $i ! -type d -and -type l -print)`"
+ complex_doit "(cd debian/tmp ; find $i ! -type d -and -type l -print) >> movelist"
done
-
- # Use a filelist, so very weird filenames can be moved.
- complex_doit "echo '$tomove' > movelist"
complex_doit "(cd debian/tmp;tar --create --remove-files --files-from=../../movelist --file -) | (cd $TMP;tar xpf -)"
doit "rm -f movelist"
fi