From 70e74913825096f896819e6b3607944d11956d39 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Fri, 7 Sep 2007 18:24:12 +0000 Subject: drop ugly hack of re-executing itself after decompressing files with other formats --- compress_files | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'compress_files') 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); } } -- cgit v1.2.1