Changeset 29576

Show
Ignore:
Timestamp:
10.12.2014 18:29:33 (5 years ago)
Author:
jts21
Message:

Fixed GS2PerlConstructor to set gsdlos correctly, and set PERL_PERTURB_KEYS=0 to avoid mangling collections when rebuilding

Location:
main/trunk/greenstone3/src/java/org/greenstone
Files:
2 modified

Legend:

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

    r27715 r29576  
    33// greenstome classes 
    44import org.greenstone.gsdl3.util.*; 
     5import org.greenstone.util.Misc; 
    56import org.greenstone.util.GlobalProperties; 
    67 
     
    5657        this.gsdl3home = GlobalProperties.getGSDL3Home(); 
    5758        this.gsdl2home = this.gsdl3home + File.separator + ".." + File.separator + "gs2build"; 
    58         this.gsdlos = System.getProperty("os.name").startsWith("Windows") ? "Windows" : "Linux"; 
     59        this.gsdlos = Misc.getGsdlOS(); 
     60             
    5961        this.path = System.getenv("PATH"); 
    6062 
     
    325327        args.add("GSDLOS=" + this.gsdlos); 
    326328        args.add("GSDL-RUN-SETUP=true"); 
     329        args.add("PERL_PERTURB_KEYS=0"); 
    327330 
    328331        for (String a : System.getenv().keySet()) 
     
    359362            BufferedWriter bw = new BufferedWriter(new FileWriter(GSFile.collectDir(this.site_home) + File.separator + this.collection_name + File.separator + "log" + File.separator + "build_log." + (System.currentTimeMillis()) + ".txt")); 
    360363            bw.write("Document Editor Build \n"); 
     364 
     365            bw.write("Command = " + command_str + "\n"); 
    361366 
    362367            String eline = null; 
  • main/trunk/greenstone3/src/java/org/greenstone/util/Misc.java

    r22085 r29576  
    7979        return false; 
    8080    } 
     81 
     82    public static String getGsdlOS() { 
     83        if (isWindows()) { 
     84            return "windows"; 
     85        } 
     86        if (isMac()) { 
     87            return "darwin"; 
     88        } 
     89        return "linux"; 
     90    } 
    8191     
    8292    public static boolean isBigEndian() {