Index: src/main/org/apache/tools/ant/Main.java
===================================================================
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/Main.java,v
retrieving revision 1.65.2.11
diff -u -r1.65.2.11 Main.java
--- src/main/org/apache/tools/ant/Main.java 12 Feb 2003 08:36:17 -0000 1.65.2.11
+++ src/main/org/apache/tools/ant/Main.java 14 Aug 2003 04:47:48 -0000
@@ -145,6 +145,9 @@
*/
private static boolean isLogFileUsed = false;
+ /** loop mode */
+ private static boolean loopMode = false;
+
/**
* Prints the message of the Throwable if it (the message) is not
* null
.
@@ -193,7 +196,15 @@
}
try {
- m.runBuild(coreLoader);
+ boolean continueLoop = false;
+ do {
+ m.runBuild(coreLoader);
+ if ( loopMode ) {
+ System.out.println( "\nPress Enter to continue or q + Enter to quit" );
+ char key = (char) System.in.read();
+ continueLoop = key != 'q' && key != 'Q';
+ }
+ } while ( continueLoop );
System.exit(0);
} catch (BuildException be) {
if (m.err != System.err) {
@@ -385,6 +396,8 @@
System.out.println(msg);
return;
}
+ } else if (arg.equals("-loop")) {
+ loopMode = true;
} else if (arg.startsWith("-")) {
// we don't have any more args to recognize!
String msg = "Unknown argument: " + arg;
@@ -753,6 +766,7 @@
msg.append(" -inputhandler the class which will handle input requests" + lSep);
msg.append(" -find search for buildfile towards the root of the" + lSep);
msg.append(" filesystem and use it" + lSep);
+ msg.append(" -loop loop mode" + lSep);
System.out.println(msg.toString());
}