code: static void processArgs(String[] args, final PrintStream out) {
          Options options = buildOptions();
  
          try {
              CommandLine cmd = parseCommandLine(options, args);
  
              if (cmd.hasOption('h')) {
                  printHelp(out, options);
              } else if (cmd.hasOption('v')) {
                  String version = GroovySystem.getVersion();
                  out.println("Groovy Version: " + version + " JVM: " + System.getProperty("java.version") + 
                          " Vendor: " + System.getProperty("java.vm.vendor")  + " OS: " + System.getProperty("os.name"));
              } else {
                  // If we fail, then exit with an error so scripting frameworks can catch it
                  // TODO: pass printstream(s) down through process
                  if (!process(cmd)) {
                      System.exit(1);
                  }
              }
          } catch (ParseException pe) {
              out.println("error: " + pe.getMessage());
              printHelp(out, options);
          } catch (IOException ioe) {
              out.println("error: " + ioe.getMessage());
          }
      }
docs: TODO: should we have an 'err' printstream too for ParseException?