FORMATS: +.tar
authorshort <>
Fri, 28 Jun 2002 22:37:04 +0000 (22:37 +0000)
committershort <>
Fri, 28 Jun 2002 22:37:04 +0000 (22:37 +0000)
generic FORMAT_TAR_GZ -> FORMAT_TAR

bin/exx

diff --git a/bin/exx b/bin/exx
index b71de1b..91c67ba 100755 (executable)
--- a/bin/exx
+++ b/bin/exx
@@ -8,8 +8,8 @@ use warnings;
 use IO::Handle;
 use Cwd qw(chdir cwd);
 
-use constant FORMAT_TAR_GZ=>'tar xzf $pathname;i=`echo *`;echo "$i"|grep -q " " || test * != $base ||'
-                            .'(mv "$i" "$i".$$;(set +x;mv "$i".$$/* .);rmdir "$i".$$)';
+use constant FORMAT_TAR=>'tar xf $pathname;i=`echo *`;echo "$i"|grep -q " " || test * != $base ||'
+                         .'(mv "$i" "$i".$$;(set +x;mv "$i".$$/* .);rmdir "$i".$$)';
 use constant FORMATS=>{
        "rpm"    =>'rpm2cpio $pathname|cpio -id --quiet',       #-v #FIXME: --sparse doesn't work, why?
        "zip"    =>'unzip -Lq $pathname',
@@ -17,9 +17,10 @@ use constant FORMATS=>{
        "deb"    =>'ar x $pathname;'
                   .'for i in *.tar.gz;do j=`basename $i .tar.gz`;mkdir -p $j;cd $j;tar xzf ../$i;cd ..;rm -f $i;done',
        "arj"    =>'unarj x $pathname',
-       "tar.gz" =>FORMAT_TAR_GZ,
+       "tar"    =>FORMAT_TAR,
+       "tar.gz" =>do { $_=FORMAT_TAR; s/xf/xzf/; $_; },
        "tgz"    =>"tar.gz",
-       "tar.bz2"=>do { $_=FORMAT_TAR_GZ; s/xzf/xjf/; $_; },
+       "tar.bz2"=>do { $_=FORMAT_TAR; s/xf/xjf/; $_; },
        "tar.bz" =>"tar.bz2",
        "tbz"    =>"tar.bz",
        };