summaryrefslogtreecommitdiff
path: root/dh_clean
diff options
context:
space:
mode:
Diffstat (limited to 'dh_clean')
-rwxr-xr-xdh_clean28
1 files changed, 13 insertions, 15 deletions
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);