mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add code to automatically uncompress .gz and .bz2 files that are given as arguments.
This commit is contained in:
parent
f8ae555c59
commit
2ffac68147
@ -127,7 +127,15 @@ sub add_file($$) {
|
||||
|
||||
my ($infile, $factor) = @_;
|
||||
|
||||
open (INFILE, "<$infile") || die "Can't open input \"$infile\"";
|
||||
if ($infile =~ /\.bz2$/) {
|
||||
# XXX This doesn't propagate errors from bzip2.
|
||||
open (INFILE, "bzip2 -cd '$infile' |") || die "Can't open input \"$infile\"";
|
||||
} elsif ($infile =~ /\.gz$/) {
|
||||
# XXX This doesn't propagate errors from gzip.
|
||||
open (INFILE, "gzip -cd '$infile' |") || die "Can't open input \"$infile\"";
|
||||
} else {
|
||||
open (INFILE, "<$infile") || die "Can't open input \"$infile\"";
|
||||
}
|
||||
while ( ! eof(INFILE) ) {
|
||||
# read the type and address
|
||||
my $line = <INFILE>;
|
||||
|
Loading…
Reference in New Issue
Block a user