From 78b5ec5e70a0e4fe18fb6d0ace07c0614eb3ee6e Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 20 Oct 2004 05:36:36 +0000 Subject: [PATCH] Added a couple command-line options. --- verify-patches | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/verify-patches b/verify-patches index 29f48b3..8d2e8bd 100755 --- a/verify-patches +++ b/verify-patches @@ -1,6 +1,15 @@ #!/usr/bin/perl use strict; +use Getopt::Long; + +my($no_cvs, $minor_updates); + +&Getopt::Long::Configure('bundling'); +GetOptions( + 'no-cvs|n' => \$no_cvs, + 'minor-updates|u' => \$minor_updates, +) or &usage; chdir('patches') if -d 'patches'; @@ -42,8 +51,10 @@ rsyncd.conf.5 EOT close OUT; -print "Using CVS to update the tmp/cvsdir copy of the source.\n"; -system qq|cvs -d "$root" co -d cvsdir rsync|; +unless ($no_cvs) { + print "Using CVS to update the tmp/cvsdir copy of the source.\n"; + system qq|cvs -d "$root" co -d cvsdir rsync|; +} @ARGV = glob('../*.diff') unless @ARGV; @@ -74,6 +85,7 @@ foreach my $diff (@ARGV) { if ($default =~ s/^D,// || $default eq 'N') { my $def = generate_new_patch($diff); $default = 'U,N' if $default eq 'N' && $def eq 'E'; + $default = 'N' if !$minor_updates && $default eq 'U,N'; } PROMPT: @@ -261,3 +273,12 @@ sub restore_cvsdir } } } + +sub usage +{ + die <