Changeset 10868


Ignore:
Timestamp:
2005-11-08T13:26:17+13:00 (18 years ago)
Author:
kjdon
Message:

now uses GSDL3SRCHOME to find the sample collectionConfig.xml file

File:
1 edited

Legend:

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

    r9874 r10868  
    77{
    88    String gsdl3_home = null;
     9    String gsdl3_srchome = null;
     10    String site = null;
    911    String site_home = null;
    1012    String collection = null;
    1113
    12     public Create(String gsdl3_home, String site, String collection)
     14    public Create(String gsdl3_home, String gsdl3_srchome, String site,
     15          String collection)
    1316    {
    1417    this.gsdl3_home = gsdl3_home;
     18    this.gsdl3_srchome = gsdl3_srchome;
     19    this.site = site;
    1520    this.site_home = GSFile.siteHome(gsdl3_home, site);
    1621    this.collection = collection;
     
    3843    createDirectory(new File(GSFile.collectionEtcDir(coll_home)));
    3944
    40     File config_template = new File(gsdl3_home + File.separator+ "resources"+File.separator + "xml"+File.separator+"collectionConfig.xml");
     45    File config_template = new File(gsdl3_srchome + File.separator+ "resources"+File.separator + "xml"+File.separator+"collectionConfig.xml");
    4146    if (!config_template.isFile()) {
    4247        System.err.println("Couldn't find the config file template "+config_template.getPath());
     
    4853
    4954    System.err.println("New collection created in "+coll_home);
    50     System.err.println("Put source documents into import, set the collection's configuration in etc/collectionConfig.xml, then run gs3-build.sh (linux) or gs3-build (windows) to build the collection");
     55    System.err.println("Put source documents into import, set the collection's configuration in etc/collectionConfig.xml, then run \"gs3-build.(sh|bat) "+ this.site+" "+this.collection+"\" to build the collection");
    5156    }
    5257
     
    6267    {
    6368    String gsdl3_home = System.getProperty("GSDL3HOME");
     69    String gsdl3_srchome = System.getProperty("GSDL3SRCHOME");
    6470    if (gsdl3_home == null) {
    6571        System.out.println("Error: Unable to locate GSDL3HOME");
     72        System.exit(1);
     73    }
     74    if (gsdl3_srchome == null) {
     75        System.out.println("Error: Unable to locate GSDL3SRCHOME");
    6676        System.exit(1);
    6777    }
     
    100110    }
    101111   
    102     Create c = new Create(gsdl3_home, site, collection);
     112    Create c = new Create(gsdl3_home, gsdl3_srchome, site, collection);
    103113    c.makeCollection();
    104114    return;
Note: See TracChangeset for help on using the changeset viewer.