--- a/bin/imager.compress Tue Aug 16 14:12:28 2011 +0200
+++ b/bin/imager.compress Tue Aug 16 14:17:50 2011 +0200
@@ -23,7 +23,7 @@
die if not @ARGV;
find(sub {
- say and return if -d;
+ say "dir $_" and return if -d;
return if not -f;
open(my $fh, $_);
@@ -40,6 +40,7 @@
$tmp = File::Temp->new(DIR => ".", TEMPLATE => ".tmp-XXXXXX");
print {$tmp} $buffer;
rename $tmp->filename => basename($_, ".gz");
+ say "uncompressed $_";
}
else {
@@ -54,10 +55,9 @@
$tmp = File::Temp->new(DIR => ".", TEMPLATE => ".tmp-XXXXXX");
print {$tmp} $zbuffer;
rename $tmp->filename => "$_.gz";
+ say " compressed $_";
}
- say;
-
close $tmp;
unlink $tmp, $_;