From 2a6374d53701ffac19cf92491536130951450a28 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 8 Feb 2006 01:40:03 +0000 Subject: [PATCH] Added --auto-cmd=STR option. --- verify-patches | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/verify-patches b/verify-patches index a4cf8c8..2fafc9d 100755 --- a/verify-patches +++ b/verify-patches @@ -6,6 +6,7 @@ use Getopt::Long; my @generated_files = qw( proto.h configure config.h.in rsync.1 rsyncd.conf.5 ); my($no_cvs, $failures_only, $minor_updates, $prepare_source, $require_quit); +my $auto_cmd = 'never'; &Getopt::Long::Configure('bundling'); GetOptions( @@ -14,6 +15,7 @@ GetOptions( 'minor-updates|u' => \$minor_updates, 'prepare-source|p' => \$prepare_source, 'require-quit|Q' => \$require_quit, + 'auto-cmd=s' => \$auto_cmd, ) or &usage; my $interesting_fuzz = $minor_updates ? '\d' : '[2-9]'; @@ -107,9 +109,14 @@ foreach my $diff (@ARGV) { print "\n----------- $diff ------------\n", "\nFix rejects, Diff create, Edit both diffs, Update patch,\n", "Apply patch again, !(CMD), Build rsync, Next, Quit: [$default] "; - my $ans = ; - chomp $ans; - $ans = $default if $ans eq ''; + my $ans = $default; + if ($default eq $auto_cmd) { + print $default, "\n"; + } else { + my $input = ; + chomp $input; + $ans = $input if $input ne ''; + } while ($ans =~ s/^\s*(!|\w)((?