Changeset 5634


Ignore:
Timestamp:
11/25/09 15:51:27 (2 years ago)
Author:
OlivierRaginel
Message:

Item8084: Try gtar if tar fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x00/core/tools/extender.pl

    r5633 r5634  
    725725    else { 
    726726        print STDERR 
    727           "Archive::Tar is not installed; trying tar on the command-line\n"; 
    728         print `tar xvf$compressed $archive`; 
    729         if ($?) { 
    730             print STDERR "tar failed: $?\n"; 
    731             return 0; 
    732         } 
     727          "Archive::Tar is not installed: $@\n"; 
     728        for my $tarBin ( qw( tar gtar ) ) { 
     729            print STDERR "Trying $tarBin on the command-line\n"; 
     730            system $tarBin, "xvf$compressed", $archive and return 1; 
     731            if ($?) { 
     732                print STDERR "$tarBin failed: $?\n"; 
     733            } 
     734        } 
     735        return 0; 
    733736    } 
    734737 
Note: See TracChangeset for help on using the changeset viewer.