Changeset 6866


Ignore:
Timestamp:
2004-02-24T11:02:30+13:00 (20 years ago)
Author:
kjdon
Message:

now need to specify a site to get a new Build object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/Build.java

    r5943 r6866  
    88  BuildManager manager;
    99
    10   public Build(List inputRoots, String collection, String outputDir)
    11   { this.manager = new BuildManager(inputRoots, collection, outputDir);
     10  public Build(List inputRoots, String site, String collection, String outputDir)
     11  { this.manager = new BuildManager(inputRoots, site, collection, outputDir);
    1212  }
    1313
     
    2020    List inputDirs = new ArrayList();
    2121    String collection = null;
     22    String site = null;
    2223    String outputDir  = null;
    2324
     
    4041    }
    4142      }
     43      else if (args[a].equals("-site")) {
     44    if (a < args.length - 1 &&
     45        args[a+1].charAt(0) != '-')
     46    {
     47      site = args[a+1];
     48      a ++;
     49    }
     50      }   
    4251      else if (args[a].equals("-outputDir")) {
    4352    if (a < args.length - 1 &&
     
    5059    }
    5160
    52     if (collection == null && inputDirs.size() == 0)
    53     { System.err.println("At least one input directory must be given, or a collection name");
    54       System.exit(0);
     61    if (site==null) {
     62    System.err.println("you must specify the site name");
     63    System.exit(0);
    5564    }
    56 
    57     Build build = new Build(inputDirs, collection, outputDir);
     65    if (collection == null && inputDirs.size() == 0) {
     66    System.err.println("At least one input directory must be given, or a collection name");
     67    System.exit(0);
     68    }
     69   
     70    Build build = new Build(inputDirs, site, collection, outputDir);
    5871    build.run();
    5972
Note: See TracChangeset for help on using the changeset viewer.