]> git.donarmstrong.com Git - debhelper.git/commitdiff
r113: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 04:58:27 +0000 (04:58 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 04:58:27 +0000 (04:58 +0000)
debian/changelog
dh_clean
dh_clean.1

index b96ab89d9dceff1b5299d5db4887329dfd036e3e..e1c7ee7593765063791e778e595d33231774ce92 100644 (file)
@@ -1,3 +1,13 @@
+debhelper (1.1.7) unstable; urgency=low
+
+  * examples/rules.multi: moved dh_movefiles into the install section.
+  * doc/README: Added a note explaining why above change was necessary.
+  * Dh_Lib.pm: escape_shell(): now escapes the full range of special
+    characters recognized by bash (and ksh). Thanks to Branden Robinson
+    <branden@purdue.edu> for looking that up.
+
+ -- Joey Hess <joeyh@master.debian.org>  Tue, 11 Aug 1998 23:32:05 -0700
+
 debhelper (1.1.6) unstable; urgency=low
 
   * dh_movefiles: don't die on symlinks (#25642). (Hope I got the fix right
index 73fb88f05bdfb114484b784db5eebda8eae6cea6..3388f146977e4838137345cf827d8637588f38cc 100755 (executable)
--- a/dh_clean
+++ b/dh_clean
@@ -1,28 +1,37 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
 #
 # Clean up $TMP and other tepmorary files generated by the 
 # build process.
 
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+use Dh_Lib;
+init();
 
-for PACKAGE in $DH_DOPACKAGES; do
-       TMP=`tmpdir $PACKAGE`
-       substvars=`pkgfile $PACKAGE substvars`
-       if [ "$substvars" ]; then
-               doit "rm -f $substvars"
-       fi
-       doit "rm -rf $TMP"
-done
-doit "rm -f debian/*.debhelper $*"
-if [ ! "$DH_K_FLAG" ]; then
-       doit "rm -f debian/files*"
-fi
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+       $TMP=tmpdir($PACKAGE);
+       $EXT=pkgext($PACKAGE);
+
+       doit("rm","-f","debian/$EXT\substvars",
+               "debian/$EXT\postinst.debhelper",
+               "debian/$EXT\postrm.debhelper",
+               "debian/$EXT\preinst.debhelper",
+               "debian/$EXT\prerm.debhelper");
+       
+       doit ("rm","-rf",$TMP);
+}
+
+if (@ARGV) {
+       doit("rm","-f","--",@ARGV);
+}
+
+if (! $dh{K_FLAG}) {
+       doit("rm","-f","debian/files*");
+}
 
 # Remove other temp files.
-# Use complex_doit so we can properly escape things.
-complex_doit "find . \( -name '#*#' -o -name '*~' -o -name DEADJOE \
-       -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
-       -o -name '.*.orig' -o -name '.*.rej' -o -name .SUMS \
-       -o -name TAGS -o -name core \
-       \) -exec rm -f {} \;"
+# (The \s+ is important, \s won't work because find would get null parameters).
+doit(split(/\s+/,"find . ( -name #*# -o -name *~ -o -name DEADJOE
+       -o -name *.orig -o -name *.rej -o -name *.bak
+       -o -name .*.orig -o -name .*.rej -o -name .SUMS
+       -o -name TAGS -o -name core
+       ) -exec rm -f {} ;"));
index 3c1d2795df56262b0e34bf0540f7a1d66d85b7da..35f59158d34ab81d2e629412dd63fd6bb6ca4475 100644 (file)
@@ -33,8 +33,5 @@ See
 for a list of environment variables that affect all debhelper commands.
 .SH "SEE ALSO"
 .BR debhelper (1)
-.SH BUGS
-Filenames with spaces in them will not currently be deleted when specified
-as parameters.
 .SH AUTHOR
 Joey Hess <joeyh@master.debian.org>