diff options
author | jrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu> | 2011-01-21 00:36:08 -0800 |
---|---|---|
committer | jrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu> | 2011-01-21 00:36:08 -0800 |
commit | 1813a504d9c59240cd830a6b1259d6f8f511ef96 (patch) | |
tree | f9ee6ecbcc9026b8bd0d912bad9e3923eee31df2 /pinyadmin/sbin/newrepo | |
parent | 54bdf5b294ddb85fd1650860c0b026a70443cff5 (diff) | |
download | piny-code-1813a504d9c59240cd830a6b1259d6f8f511ef96.tar.gz piny-code-1813a504d9c59240cd830a6b1259d6f8f511ef96.zip |
Adding noninteractive mode to newrepo
Diffstat (limited to 'pinyadmin/sbin/newrepo')
-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; }; |