diff options
author | joey <joey> | 1999-08-17 05:10:37 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 05:10:37 +0000 |
commit | 092d1f70e74cc197215c6c8f401b634f50591830 (patch) | |
tree | 4f686e2b40ef15f0c84ae47a8f284881cf353f38 /dh_md5sums | |
parent | baff96382aa2b0e622ef2985c5451ba92de4fc71 (diff) | |
download | debhelper-092d1f70e74cc197215c6c8f401b634f50591830.tar.gz |
r177: Initial Import
Diffstat (limited to 'dh_md5sums')
-rwxr-xr-x | dh_md5sums | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -29,7 +29,13 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) { } $olddir=getcwd(); - complex_doit("cd $TMP ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -0 md5sum > DEBIAN/md5sums ; cd $olddir"); - doit("chmod",644,"$TMP/DEBIAN/md5sums"); - doit("chown","root.root","$TMP/DEBIAN/md5sums"); + complex_doit("cd $TMP ; find * -type f $exclude ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums ; cd $olddir"); + # If the file's empty, no reason to waste inodes on it. + if (-z "$TMP/DEBIAN/md5sums") { + doit("rm","-f","$TMP/DEBIAN/md5sums"); + } + else { + doit("chmod",644,"$TMP/DEBIAN/md5sums"); + doit("chown","root.root","$TMP/DEBIAN/md5sums"); + } } |