Changeset 30591 for gs3-extensions/solr


Ignore:
Timestamp:
2016-06-24T15:34:02+12:00 (8 years ago)
Author:
ak19
Message:

Correct way of allowing spaces in filepath when using a batch for loop. Fix to revision 30400 that had to be undone in revision 30532.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/gs3-setup.bat

    r30574 r30591  
    1919:: Loosely based on
    2020:: http://stackoverflow.com/questions/7708681/how-to-read-from-a-properties-file-using-batch-script
    21 FOR /F "tokens=1,2 delims==" %%G IN (%GSDL3SRCHOME%\build.properties) DO (
     21:: for with usebackq option allows spaces in filepath to be protected with double quotes
     22:: (backquotes will be used for executing the commands)
     23FOR /F "usebackq tokens=1,2 delims==" %%G IN ("%GSDL3SRCHOME%\build.properties") DO (
    2224    if "%%G"=="tomcat.server" set SOLR_HOST=%%H& set FOUNDPROPS=!FOUNDPROPS!found
    2325    if "%%G"=="tomcat.port" set SOLR_PORT=%%H& set FOUNDPROPS=!FOUNDPROPS!found
Note: See TracChangeset for help on using the changeset viewer.