Mercurial > hg > chronicle
comparison 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 |
comparison
equal
deleted
inserted
replaced
256:5ea9f2d8bd8e | 257:389f234d4111 |
---|---|
202 my $VERSION = 0; | 202 my $VERSION = 0; |
203 | 203 |
204 # | 204 # |
205 # Parse options. | 205 # Parse options. |
206 # | 206 # |
207 GetOptions( | 207 if ( |
208 | 208 !GetOptions( |
209 # input / output | 209 |
210 "spool-dir=s", \$CONFIG{ 'spool-dir' }, | 210 # input / output |
211 "live-dir=s", \$CONFIG{ 'live-dir' }, | 211 "spool-dir=s", \$CONFIG{ 'spool-dir' }, |
212 | 212 "live-dir=s", \$CONFIG{ 'live-dir' }, |
213 # testing? | 213 |
214 "test", \$CONFIG{ 'test' }, | 214 # testing? |
215 | 215 "test", \$CONFIG{ 'test' }, |
216 # command? | 216 |
217 "post-move=s", \$CONFIG{ 'post-move' }, | 217 # command? |
218 | 218 "post-move=s", \$CONFIG{ 'post-move' }, |
219 # Help options | 219 |
220 "help", \$HELP, | 220 # Help options |
221 "manual", \$MANUAL, | 221 "help", \$HELP, |
222 "verbose", \$CONFIG{ 'verbose' }, | 222 "manual", \$MANUAL, |
223 "version", \$VERSION, | 223 "verbose", \$CONFIG{ 'verbose' }, |
224 | 224 "version", \$VERSION, |
225 ); | 225 |
226 ) | |
227 ) | |
228 { | |
229 exit; | |
230 } | |
226 | 231 |
227 pod2usage(1) if $HELP; | 232 pod2usage(1) if $HELP; |
228 pod2usage( -verbose => 2 ) if $MANUAL; | 233 pod2usage( -verbose => 2 ) if $MANUAL; |
229 | 234 |
230 if ($VERSION) | 235 if ($VERSION) |