diff options
-rwxr-xr-x | pinyadmin/sbin/newrepo | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pinyadmin/sbin/newrepo b/pinyadmin/sbin/newrepo index a178ecb..1f7f546 100755 --- a/pinyadmin/sbin/newrepo +++ b/pinyadmin/sbin/newrepo @@ -7,7 +7,13 @@ use Moose::Util::TypeConstraints qw( find_type_constraint ); use Piny; -my ( $name ) = @ARGV; +my ( $batch, $name ); + +if ( $ARGV[0] eq "--batch" ) { + ( $batch, $name ) = @ARGV; +} else { + ( $name ) = @ARGV; +}; if ( not defined $name ) { print "Usage: newrepo REPONAME\n"; @@ -27,6 +33,9 @@ while( 1 ) { if ( not find_type_constraint( "SimpleText" )->check( $description ) ) { print "Must be 1-80 characters long; control characters (including tab) not allowed.\n"; + if ( defined $batch ) { + exit; + }; next; }; |