From 97a852f6b6218f307d6b31a7c5bf67a509fae3ba Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 22 Jun 2013 00:14:32 +0000 Subject: simplify xargs() usage now that all callers care about its return value Note: This commit was accidentally missed when importing from subversion and has now been restored. --- compress_files | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/compress_files b/compress_files index 4702dae..7831d07 100755 --- a/compress_files +++ b/compress_files @@ -120,9 +120,8 @@ if (@files) { : $ext eq '.xz' ? qw(xz -f) : qw() ; - xargs(\@files, @command); - die "Something wrong with the man/info file compression" - if $?; + xargs(\@files, @command) + or die "Something wrong with the man/info file compression"; } # Fix up symlinks that were pointing to the uncompressed files. @@ -176,7 +175,7 @@ sub xargs { $length = $static_length + length($arg) + 1; } } - system(@_, @collect) if @collect > 0; + system(@_, @collect) == 0 if @collect > 0; } # uncompress info/man pages with a given extension @@ -203,9 +202,8 @@ sub uncompress_files { } if (@compressed_files) { - xargs(\@compressed_files, $command, "-d"); - die "Something wrong with the decompression of the $extension man/info file" - if $?; + xargs(\@compressed_files, $command, "-d") + or die "Something wrong with the decompression of the $extension man/info file"; my $length = length($extension); push(@files, map { substr($_, 0, -$length) } @compressed_files); } -- cgit v1.2.1