Changeset 25539

Show
Ignore:
Timestamp:
08.05.2012 09:51:17 (7 years ago)
Author:
sjm84
Message:

Updated the import command to include the ability to add a manifest file

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java

    r24883 r25539  
    2424public class GS2PerlConstructor extends CollectionConstructor 
    2525{ 
    26  
    2726    public static final int NEW = 0; 
    2827    public static final int IMPORT = 1; 
     
    120119            break; 
    121120        } 
    122  
    123121    } 
    124122 
     
    147145    { 
    148146        sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: import collection.")); 
    149         Vector command = new Vector(); 
    150         command.add("import.pl"); 
     147        Vector<String> command = new Vector<String>(); 
     148        command.add(GlobalProperties.getProperty("perl.path", "perl")); 
     149        command.add("-S"); 
     150        command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "import.pl"); 
     151        if (this.manifest_file != null) 
     152        { 
     153            command.add("-keepold"); 
     154            command.add("-manifest"); 
     155            command.add(this.manifest_file); 
     156        } 
     157        command.add("-site"); 
     158        command.add(this.site_name); 
    151159        command.add("-collectdir"); 
    152160        command.add(GSFile.collectDir(this.site_home)); 
     
    166174    { 
    167175        sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: build collection.")); 
    168         Vector command = new Vector(); 
     176        Vector<String> command = new Vector<String>(); 
    169177        command.add(GlobalProperties.getProperty("perl.path", "perl")); 
    170178        command.add("-S");