aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-09-07 18:24:12 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-09-07 18:24:12 +0000
commit70e74913825096f896819e6b3607944d11956d39 (patch)
treedd6ddd8481d622da6f279a86e54ee14182999fc1
parent85dd5483d0d32b15d60fa6963203ac7607e8bd2c (diff)
downloadspec-helper-70e74913825096f896819e6b3607944d11956d39.tar
spec-helper-70e74913825096f896819e6b3607944d11956d39.tar.gz
spec-helper-70e74913825096f896819e6b3607944d11956d39.tar.bz2
spec-helper-70e74913825096f896819e6b3607944d11956d39.tar.xz
spec-helper-70e74913825096f896819e6b3607944d11956d39.zip
drop ugly hack of re-executing itself after decompressing files with other formats
-rwxr-xr-xcompress_files12
1 files changed, 9 insertions, 3 deletions
diff --git a/compress_files b/compress_files
index b8b9d73..80c5550 100755
--- a/compress_files
+++ b/compress_files
@@ -118,21 +118,27 @@ if ($ext ne '.gz') {
my @gz_files = split(/\n/, `find usr/info usr/share/info usr/man usr/share/man usr/X11*/man usr/lib/perl5/man -type f -name "*.gz" 2>/dev/null || true`);
if (@gz_files) {
xargs(\@gz_files, "gzip", "-d");
- $? ? die "Something wrong with the decompression of the gzip man/info file, fix this ASAP" : exec($0)
+ die "Something wrong with the decompression of the gzip man/info file"
+ if $?;
+ push(@files, map { substr($_, 0, -3) } @gz_files);
}
}
if ($ext ne '.bz2') {
my @bz_files = split(/\n/, `find usr/info usr/share/info usr/man usr/share/man usr/X11*/man usr/lib/perl5/man -type f -name "*.bz2" 2>/dev/null || true`);
if (@bz_files) {
xargs(\@bz_files, "bzip2", "-d");
- $? ? die "Something wrong with the decompression of the bzip2 man/info file, fix this ASAP" : exec($0)
+ die "Something wrong with the decompression of the bzip2 man/info file"
+ if $?;
+ push(@files, map { substr($_, 0, -4) } @bz_files);
}
}
if ($ext ne '.lzma') {
my @lzma_files = split(/\n/, `find usr/info usr/share/info usr/man usr/share/man usr/X11*/man usr/lib/perl5/man -type f -name "*.lzma" 2>/dev/null || true`);
if (@lzma_files) {
xargs(\@lzma_files, "lzmash", "-d");
- $? ? die "Something wrong with the decompression of the lzma man/info file, fix this ASAP" : exec($0)
+ die "Something wrong with the decompression of the lzma man/info file"
+ if $?;
+ push(@files, map { substr($_, 0, -5) } @lzma_files);
}
}