Mercurial > hg > chronicle
diff bin/chronicle-spooler @ 257:389f234d4111
Failure to parse options should make the script exit
author | Steve Kemp <steve@steve.org.uk> |
---|---|
date | Wed, 18 Jun 2008 21:58:16 +0100 |
parents | 6dadbc23cd74 |
children |
line wrap: on
line diff
--- a/bin/chronicle-spooler Tue Jun 03 21:48:39 2008 +0100 +++ b/bin/chronicle-spooler Wed Jun 18 21:58:16 2008 +0100 @@ -204,25 +204,30 @@ # # Parse options. # - GetOptions( + if ( + !GetOptions( - # input / output - "spool-dir=s", \$CONFIG{ 'spool-dir' }, - "live-dir=s", \$CONFIG{ 'live-dir' }, + # input / output + "spool-dir=s", \$CONFIG{ 'spool-dir' }, + "live-dir=s", \$CONFIG{ 'live-dir' }, - # testing? - "test", \$CONFIG{ 'test' }, + # testing? + "test", \$CONFIG{ 'test' }, - # command? - "post-move=s", \$CONFIG{ 'post-move' }, + # command? + "post-move=s", \$CONFIG{ 'post-move' }, - # Help options - "help", \$HELP, - "manual", \$MANUAL, - "verbose", \$CONFIG{ 'verbose' }, - "version", \$VERSION, + # Help options + "help", \$HELP, + "manual", \$MANUAL, + "verbose", \$CONFIG{ 'verbose' }, + "version", \$VERSION, - ); + ) + ) + { + exit; + } pod2usage(1) if $HELP; pod2usage( -verbose => 2 ) if $MANUAL;