|
|
|
@ -12,6 +12,13 @@ if ( (!defined $file) || (!defined $file) ){ |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
|
|
|
|
chdir($dir); |
|
|
|
|
|
|
|
unless(chdir($dir)) |
|
|
|
{ |
|
|
|
die "Error: Can't change directory!: $!"; |
|
|
|
} |
|
|
|
|
|
|
|
open( INFILE, "<$file" ) || die "input-file '$file' could not be opened"; |
|
|
|
|
|
|
|
my $fdcache = {}; |
|
|
|
@ -25,10 +32,10 @@ while (my $zeile = <INFILE>) { |
|
|
|
|
|
|
|
if ( !exists $fdcache->{$ident}){ |
|
|
|
$fdcache->{$ident} = {}; |
|
|
|
print "Open $ident.typescript\n"; |
|
|
|
$fdcache->{$ident}->{typescript} = FileHandle->new("> $ident.typescript"); |
|
|
|
print "Open $ident.timing\n"; |
|
|
|
$fdcache->{$ident}->{timing} = FileHandle->new("> $ident.timing"); |
|
|
|
print "Create $ident.typescript.base64\n"; |
|
|
|
$fdcache->{$ident}->{typescript} = FileHandle->new("> $ident.typescript.base64"); |
|
|
|
print "Create $ident.timing.base64\n"; |
|
|
|
$fdcache->{$ident}->{timing} = FileHandle->new("> $ident.timing.base64"); |
|
|
|
} |
|
|
|
|
|
|
|
my $fd = $fdcache->{$ident}->{$type}; |
|
|
|
@ -41,4 +48,10 @@ close(INFILE); |
|
|
|
foreach my $ident(keys %{$fdcache}){ |
|
|
|
close $fdcache->{$ident}->{typescript}; |
|
|
|
close $fdcache->{$ident}->{timing}; |
|
|
|
system("base64 -d $ident.typescript.base64 |gzip -c > $ident.typescript.gz"); |
|
|
|
system("base64 -d $ident.timing.base64 |gzip -c > $ident.timing.gz"); |
|
|
|
unlink("$ident.timing.base64"); |
|
|
|
unlink("$ident.typescript.base64"); |
|
|
|
print "removed $ident.typescript.base64, created $ident.typescript.gz\n"; |
|
|
|
print "removed $ident.timing.base64, created $ident.timing.gz\n"; |
|
|
|
} |