From 053f6f8b4e7431d32511aef209188a084e8c7e79 Mon Sep 17 00:00:00 2001 From: joey Date: Fri, 9 Feb 2001 00:57:53 +0000 Subject: r420: big monsta changes --- dh_clean | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'dh_clean') diff --git a/dh_clean b/dh_clean index 4b98a6a0..c25dbde7 100755 --- a/dh_clean +++ b/dh_clean @@ -3,22 +3,23 @@ # Clean up $TMP and other tepmorary files generated by the # build process. +use strict; use Debian::Debhelper::Dh_Lib; init(); -foreach $PACKAGE (@{$dh{DOPACKAGES}}) { - $TMP=tmpdir($PACKAGE); - $EXT=pkgext($PACKAGE); +foreach my $package (@{$dh{DOPACKAGES}}) { + my $tmp=tmpdir($package); + my $ext=pkgext($package); if (! $dh{D_FLAG}) { - doit("rm","-f","debian/${EXT}substvars", - "debian/${EXT}postinst.debhelper", - "debian/${EXT}postrm.debhelper", - "debian/${EXT}preinst.debhelper", - "debian/${EXT}prerm.debhelper"); + 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); + doit ("rm","-rf",$tmp); } if (! $dh{D_FLAG}) { @@ -31,10 +32,8 @@ if (! $dh{D_FLAG}) { } # See if some files that would normally be deleted are excluded. - if (! defined($dh{EXCLUDE_FIND}) || $dh{EXCLUDE_FIND} eq '') { - $find_options=""; - } - else { + my $find_options=''; + if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') { $find_options="-a ! ( $dh{EXCLUDE_FIND} )"; } @@ -50,6 +49,5 @@ if (! $dh{D_FLAG}) { ) $find_options -exec rm -f {} ;")); } -doit('rm', '-rf', 'debian/tmp') - if -x 'debian/tmp' && ! Debian::Debhelper::Dh_Lib::compat(1); +doit('rm', '-rf', 'debian/tmp') if -x 'debian/tmp' && ! compat(1); -- cgit v1.2.3