|
From: <dgl...@us...> - 2003-08-06 03:19:03
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner
In directory sc8-pr-cvs1:/tmp/cvs-serv28628/modules/scanner/src/com/babeldoc/scanner
Modified Files:
Scanner.java
Log Message:
If '-h' switch, display help screen and exit
Index: Scanner.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/Scanner.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Scanner.java 4 Aug 2003 23:57:48 -0000 1.22
--- Scanner.java 6 Aug 2003 03:19:00 -0000 1.23
***************
*** 129,132 ****
--- 129,139 ----
public void execute(CommandLine commandLine) {
super.execute(commandLine);
+
+ // if the user asked for a help screen, exit and let him rerun the command.
+ if (commandLine.hasOption('h')) {
+ return;
+ }
+
+ // otherwise, continue with normal execution path
if (commandLine.hasOption('s')) {
scannerConfig = commandLine.getOptionValue('s');
***************
*** 141,144 ****
--- 148,152 ----
/**
+ * TODO: DOCUMENT ME!
*
*/
***************
*** 257,260 ****
--- 265,274 ----
*/
public void stop() {
+ // if there is no scheduler, then we haven't started anything that needs to be
+ // stopped...
+ if (this.scheduler == null) {
+ return;
+ }
+
log.logInfo("Shutting down...");
log.logInfo("Stopping workers...");
|