Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions bin/apply
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ use constant EX_SUCCESS => 0;
use constant EX_FAILURE => 1;

my $Program = basename($0);
my ($VERSION) = '1.5';
my ($VERSION) = '1.6';

my $argc = 1;
my $argc;
my $debug = 0;
my $magic = '%';

Expand Down Expand Up @@ -52,6 +52,10 @@ while (@ARGV) {
}
}
elsif ($ARGV[0] =~ m/\A\-(\d+)\Z/) {
if (defined $argc) {
warn "$Program: option -# specified more than once\n";
usage();
}
$argc = $1;
}
elsif ($ARGV[0] eq '-d') {
Expand All @@ -64,6 +68,7 @@ while (@ARGV) {
shift;
}

$argc = 1 unless defined $argc;
my $command = shift;
usage() unless @ARGV;

Expand Down
Loading