Changeset 27674 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java
- Timestamp:
- 2013-06-20T16:06:01+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/build/GS2PerlConstructor.java
r27107 r27674 150 150 sendMessage(new ConstructionEvent(this, GSStatus.INFO, "Collection construction: import collection.")); 151 151 Vector<String> command = new Vector<String>(); 152 command.add(GlobalProperties.getProperty("perl.path", "perl") );152 command.add(GlobalProperties.getProperty("perl.path", "perl") + "perl"); 153 153 command.add("-S"); 154 154 command.add(GlobalProperties.getGS2Build() + File.separator + "bin" + File.separator + "script" + File.separator + "import.pl"); … … 212 212 } 213 213 214 214 /* 215 215 216 216 // move building to index … … 235 235 // success!! - need to send the final completed message 236 236 sendProcessComplete(new ConstructionEvent(this, GSStatus.COMPLETED, "")); 237 237 */ 238 238 239 239 // Running activate.pl instead of making java move building to index as above … … 295 295 protected boolean runPerlCommand(String[] command) 296 296 { 297 String msg;298 ConstructionEvent evt;297 int sepIndex = this.gsdl3home.lastIndexOf(File.separator); 298 String srcHome = this.gsdl3home.substring(0, sepIndex); 299 299 300 300 ArrayList<String> args = new ArrayList<String>(); 301 301 args.add("GSDLHOME=" + this.gsdl2home); 302 302 args.add("GSDL3HOME=" + this.gsdl3home); 303 args.add("GSDL3SRCHOME=" + srcHome); 303 304 args.add("GSDLOS=" + this.gsdlos); 304 305 args.add("GSDL-RUN-SETUP=true"); … … 328 329 // Captures the std err of a program and pipes it into 329 330 // std in of java 330 331 331 332 File logDir = new File(GSFile.collectDir(this.site_home) + File.separator + this.collection_name + File.separator + "log"); 332 if (!logDir.exists())333 if (!logDir.exists()) 333 334 { 334 335 logDir.mkdir(); … … 336 337 337 338 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")); 338 bw.write("Document Editor Build \n");339 bw.write("Document Editor Build \n"); 339 340 340 341 String eline = null; … … 386 387 return false; 387 388 } 388 389 389 } 390 390 catch (Exception e) 391 391 { 392 e.printStackTrace(); 392 393 sendProcessStatus(new ConstructionEvent(this, GSStatus.ERROR, "Exception occurred " + e.toString())); 393 394 }
Note:
See TracChangeset
for help on using the changeset viewer.