'auto-cmd=s' => \$auto_cmd,
) or &usage;
+$auto_cmd = qr/^($auto_cmd)$/;
+
my $interesting_fuzz = $minor_updates ? '\d' : '[2-9]';
chdir('patches') if -d 'patches';
"\nFix rejects, Diff create, Edit both diffs, Update patch,\n",
"Apply patch again, !(CMD), Build rsync, Next, Quit: [$default] ";
my $ans = $default;
- if ($default eq $auto_cmd) {
+ if ($default =~ /$auto_cmd/) {
print $default, "\n";
} else {
my $input = <STDIN>;
{
die <<EOT;
Usage: $0 [OPTS] [DIFF-FILE...]
- --auto-cmd=STR If the suggested command is STR, enter it automatically
+ --auto-cmd=REGEX If default_cmd =~ /^(REGEX)\$/, enter it automatically
-f, --failures-only Suggest skipping patches that don't have failing hunks
-n, --no-cvs Don't update tmp/cvsdir at the start of the run
-p, --prepare-source Run ./prepare-source and include generated files in diff