summaryrefslogtreecommitdiff
path: root/cpan/Archive-Tar/bin
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/Archive-Tar/bin')
-rw-r--r--cpan/Archive-Tar/bin/ptar23
1 files changed, 3 insertions, 20 deletions
diff --git a/cpan/Archive-Tar/bin/ptar b/cpan/Archive-Tar/bin/ptar
index 0eaffa7ccb..14c09128fc 100644
--- a/cpan/Archive-Tar/bin/ptar
+++ b/cpan/Archive-Tar/bin/ptar
@@ -6,13 +6,8 @@ use Getopt::Std;
use Archive::Tar;
use Data::Dumper;
-# Allow historic support for dashless bundled options
-# tar cvf file.tar
-# is valid (GNU) tar style
-@ARGV && $ARGV[0] =~ m/^[DdcvzthxIC]+[fT]?$/ and
- unshift @ARGV, map { "-$_" } split m// => shift @ARGV;
my $opts = {};
-getopts('Ddcvzthxf:ICT:', $opts) or die usage();
+getopts('Ddcvzthxf:IC', $opts) or die usage();
### show the help message ###
die usage() if $opts->{h};
@@ -33,21 +28,11 @@ my $verbose = $opts->{v} ? 1 : 0;
my $file = $opts->{f} ? $opts->{f} : 'default.tar';
my $tar = Archive::Tar->new();
+
if( $opts->{c} ) {
my @files;
- my @src = @ARGV;
- if( $opts->{T} ) {
- if( $opts->{T} eq "-" ) {
- chomp( @src = <STDIN> );
- } elsif( open my $fh, "<", $opts->{T} ) {
- chomp( @src = <$fh> );
- } else {
- die "$0: $opts->{T}: $!\n";
- }
- }
-
find( sub { push @files, $File::Find::name;
- print $File::Find::name.$/ if $verbose }, @src );
+ print $File::Find::name.$/ if $verbose }, @ARGV );
if ($file eq '-') {
use IO::Handle;
@@ -103,7 +88,6 @@ sub usage {
=head1 SYNOPSIS
ptar -c [-v] [-z] [-C] [-f ARCHIVE_FILE | -] FILE FILE ...
- ptar -c [-v] [-z] [-C] [-T index | -] [-f ARCHIVE_FILE | -]
ptar -x [-v] [-z] [-f ARCHIVE_FILE | -]
ptar -t [-z] [-f ARCHIVE_FILE | -]
ptar -h
@@ -118,7 +102,6 @@ sub usage {
v Print filenames as they are added or extracted from ARCHIVE_FILE
h Prints this help message
C CPAN mode - drop 022 from permissions
- T get names to create from file
=head1 SEE ALSO