From 031868f3f6f1e1ff042f6c01d350d6bd260e4c9f Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 04:58:27 +0000 Subject: [PATCH] r113: Initial Import --- debian/changelog | 10 ++++++++++ dh_clean | 51 ++++++++++++++++++++++++++++-------------------- dh_clean.1 | 3 --- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index b96ab89..e1c7ee7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 + for looking that up. + + -- Joey Hess 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 diff --git a/dh_clean b/dh_clean index 73fb88f..3388f14 100755 --- 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 {} ;")); diff --git a/dh_clean.1 b/dh_clean.1 index 3c1d279..35f5915 100644 --- a/dh_clean.1 +++ b/dh_clean.1 @@ -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 -- 2.39.5