@@ -0,0 +1,3143 @@
+/* **********************************************************************%0A    Copyright 2009 Rensselaer Polytechnic Institute. All worldwide rights reserved.%0A%0A    Redistribution and use of this distribution in source and binary forms,%0A    with or without modification, are permitted provided that:%0A       The above copyright notice and this permission notice appear in all%0A        copies and supporting documentation;%0A%0A        The name, identifiers, and trademarks of Rensselaer Polytechnic%0A        Institute are not used in advertising or publicity without the%0A        express prior written permission of Rensselaer Polytechnic Institute;%0A%0A    DISCLAIMER: The software is distributed%22 AS IS%22 without any express or%0A    implied warranty, including but not limited to, any implied warranties%0A    of merchantability or fitness for a particular purpose or any warrant)'%0A    of non-infringement of any current or pending patent rights. The authors%0A    of the software make no representations about the suitability of this%0A    software for any particular purpose. The entire risk as to the quality%0A    and performance of the software is with the user. Should the software%0A    prove defective, the user assumes the cost of all necessary servicing,%0A    repair or correction. In particular, neither Rensselaer Polytechnic%0A    Institute, nor the authors of the software are liable for any indirect,%0A    special, consequential, or incidental damages related to the software,%0A    to the maximum extent the law permits.%0A*/%0Apackage edu.rpi.sss.util;%0A%0Aimport java.io.Serializable;%0A%0A/** Class to help handling of Main method arguments.%0A *%0A * @author Mike Douglass%0A */%0Apublic class Args implements Serializable %7B%0A  private String%5B%5D args;%0A  private int pos;%0A%0A  /**%0A   * @param args%0A   */%0A  public Args(String%5B%5D args) %7B%0A    this.args = args;%0A  %7D%0A%0A  /** Get the current argument without advancing%0A   *%0A   * @return String%0A   */%0A  public String current() %7B%0A    return args%5Bpos%5D;%0A  %7D%0A%0A  /** Get the current argument and advance the index%0A   *%0A   * @return String%0A   */%0A  public String next() %7B%0A    pos++;%0A    return args%5Bpos - 1%5D;%0A  %7D%0A%0A  /**%0A   * @return true if more args%0A   */%0A  public boolean more() %7B%0A    return pos %3C args.length;%0A  %7D%0A%0A  /**%0A   * @param numargs%0A   * @return true if that may args are available%0A   */%0A  public boolean test(int numargs) %7B%0A    return (pos + numargs) %3C= args.length;%0A  %7D%0A%0A  /**%0A   * @return true if the current arg starts with %22-%22%0A   */%0A  public boolean isMinusArg() %7B%0A    return more() && current().startsWith(%22-%22);%0A  %7D%0A%0A  /**%0A   * @param val%0A   * @return true if the next arg matches the string%0A   * @throws Exception%0A   */%0A  public boolean ifMatch(String val) throws Exception %7B%0A    return ifMatch(val, 1);%0A  %7D%0A%0A  /**%0A   * @param val%0A   * @param numargs%0A   * @return true if the next arg matches the string and has a sufficient number%0A   *     of parameters%0A   * @throws Exception%0A   */%0A  public boolean ifMatch(String val, int numargs) throws Exception %7B%0A    if (!current().equals(val)) %7B%0A      return false;%0A    %7D%0A%0A    if (!test(numargs)) %7B%0A      throw new Exception(%22Invalid args%22);%0A    %7D%0A%0A    pos++;%0A    return true;%0A  %7D%0A%7D%0A

Fix install script and dirtools so that we can add a user