Ignore:
Timestamp:
2008-03-20T20:28:02+13:00 (16 years ago)
Author:
ak19
Message:
  1. rt.exec(args) is now used on Linux as well instead of its specific rt.exec(command) in order to deal with spaces in filenames. 2. Added code to work with replace_srcdoc_with_html.pl script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/shell/GShell.java

    r14974 r15110  
    8989    static final public int CONVERT = 5;
    9090    static final public int EXPLODE = 6;
     91    static final public int SRCREPLACE = 7; // for replacing source docs with their html
    9192
    9293    /** Elements in status type enumeration. */
     
    103104    static public String GSHELL_CONVERT = "gshell_convert";
    104105    static public String GSHELL_EXPLODE = "gshell_explode";
     106    static public String GSHELL_SRCREPLACE = "gshell_srcreplace"; // for replacing source docs with their html versions
    105107
    106108    /** Determine if the given process is still executing. It does this by attempting to throw an exception - not the most efficient way, but the only one as far as I know
     
    236238        Runtime rt = Runtime.getRuntime();
    237239        Process prcs = null;
    238         if (Utility.isWindows()){
    239         prcs = rt.exec(args);
    240         }else{
    241         prcs = rt.exec(command);
    242         }
    243        
     240     
     241        prcs = rt.exec(args);
     242        // If we used single argument exec, spaces in filenames or paths cause problems
     243        // I.e. better to avoid: prcs = rt.exec(command);
     244               
    244245        InputStreamReader eisr = new InputStreamReader( prcs.getErrorStream(), "UTF-8" );
    245246        InputStreamReader stdisr = new InputStreamReader( prcs.getInputStream(), "UTF-8"  );       
     
    604605        name = "explode_metadata_database.pl";
    605606        break;
     607    case SRCREPLACE: // To work with replace_srcdoc_with_html.pl
     608        name = "replace_srcdoc_with_html.pl";
     609        break;
    606610    default:
    607611        name = "";
Note: See TracChangeset for help on using the changeset viewer.