1.1 --- a/com/repdev/launcher/Launcher.java Fri Jun 06 14:51:59 2008 +0000
1.2 +++ b/com/repdev/launcher/Launcher.java Tue Jun 30 15:24:45 2009 -0400
1.3 @@ -20,12 +20,9 @@
1.4
1.5 public static void main(String[] args) throws Exception {
1.6 boolean log = false;
1.7 - boolean noupdate = false;
1.8 for(String arg: args) {
1.9 if( arg.equals("--log") )
1.10 log = true;
1.11 - if( arg.equals("--no-update") )
1.12 - noupdate = true;
1.13 if( arg.equals("--help") || arg.equals("-h") ) {
1.14 usage();
1.15 System.exit(1);
1.16 @@ -45,48 +42,10 @@
1.17 System.err.println(">> Started: " + date + "\n");
1.18 }
1.19
1.20 - // Try to update repdev via svn...
1.21 - if( !noupdate ) {
1.22 - try {
1.23 - exec(System.getProperty("user.dir") + "\\svnbin\\svn.exe cleanup");
1.24 - exec(System.getProperty("user.dir") + "\\svnbin\\svn.exe update");
1.25 - System.out.println();
1.26 - System.err.println();
1.27 - } catch (Exception e) {
1.28 - System.err.println("Could not update via subversion. This may not be a big issue, but to update you will need to download new zip packages");
1.29 - System.err.println("Error: " + e.getMessage());
1.30 - }
1.31 - }
1.32 -
1.33 // Finally, we launch repdev...
1.34 com.repdev.RepDevMain.main(args);
1.35 }
1.36
1.37 - /**
1.38 - * Execute a command and log it to stderr and stdout...
1.39 - * @param cmd
1.40 - * @return Exit value of the process.
1.41 - */
1.42 - private static int exec(String cmd) throws Exception {
1.43 - Process p = Runtime.getRuntime().exec(cmd);
1.44 - BufferedReader stdout = new BufferedReader(new InputStreamReader(p.getInputStream()));
1.45 - BufferedReader stderr = new BufferedReader(new InputStreamReader(p.getErrorStream()));
1.46 -
1.47 - // We want this to finish before dumping output...
1.48 - p.waitFor();
1.49 -
1.50 - String line = "";
1.51 - while( (line = stdout.readLine()) != null )
1.52 - System.out.println(line);
1.53 - while( (line = stderr.readLine()) != null )
1.54 - System.err.println(line);
1.55 -
1.56 - stdout.close();
1.57 - stderr.close();
1.58 -
1.59 - return p.exitValue();
1.60 - }
1.61 -
1.62 private static void usage() {
1.63 String[] usage = {
1.64 "RepDev Launcher - Usage:",
1.65 @@ -94,7 +53,6 @@
1.66 "\tCommand\tAction",
1.67 "\t--help or -h\tThis message",
1.68 "\t--log\tLog all output to stdout.txt and stderr.txt",
1.69 - "\t--no-update\tSkip SVN update (faster startup)",
1.70 "",
1.71 };
1.72