aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Loeffler <zvpunry@zvpunry.de>2007-02-14 17:03:12 +0100
committerShawn O. Pearce <spearce@spearce.org>2007-02-21 11:09:57 -0500
commitc750da256a54f189de28d3deb054328d67f9b9be (patch)
treee6d69089612b65e87f4eea98f342fe25a7648624
parent3efb1f343a9d6214a59a814029cab96638e9b915 (diff)
downloadgit-c750da256a54f189de28d3deb054328d67f9b9be.tar.gz
git-c750da256a54f189de28d3deb054328d67f9b9be.tar.xz
Use gunzip -c over gzcat in import-tars example.
Not everyone has gzcat or bzcat installed on their system, but gunzip -c and bunzip2 -c perform the same task and are available if the user has installed gzip support or bzip2 support. Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xcontrib/fast-import/import-tars.perl9
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 990c9e70b..5585a8b2c 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -25,11 +25,14 @@ foreach my $tar_file (@ARGV)
my $tar_name = $1;
if ($tar_name =~ s/\.(tar\.gz|tgz)$//) {
- open(I, '-|', 'gzcat', $tar_file) or die "Unable to gzcat $tar_file: $!\n";
+ open(I, '-|', 'gunzip', '-c', $tar_file)
+ or die "Unable to gunzip -c $tar_file: $!\n";
} elsif ($tar_name =~ s/\.(tar\.bz2|tbz2)$//) {
- open(I, '-|', 'bzcat', $tar_file) or die "Unable to bzcat $tar_file: $!\n";
+ open(I, '-|', 'bunzip2', '-c', $tar_file)
+ or die "Unable to bunzip2 -c $tar_file: $!\n";
} elsif ($tar_name =~ s/\.tar\.Z$//) {
- open(I, '-|', 'zcat', $tar_file) or die "Unable to zcat $tar_file: $!\n";
+ open(I, '-|', 'uncompress', '-c', $tar_file)
+ or die "Unable to uncompress -c $tar_file: $!\n";
} elsif ($tar_name =~ s/\.tar$//) {
open(I, $tar_file) or die "Unable to open $tar_file: $!\n";
} else {