Changeset 30574 for gs3-extensions
- Timestamp:
- 2016-06-16T19:20:23+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/solr/trunk/src/gs3-setup.bat
r30532 r30574 14 14 set SOLR_PORT=8983 15 15 set SOLR_HOST=localhost 16 17 setlocal enabledelayedexpansion 18 set FOUNDPROPS= 16 19 :: Loosely based on 17 20 :: http://stackoverflow.com/questions/7708681/how-to-read-from-a-properties-file-using-batch-script 18 21 FOR /F "tokens=1,2 delims==" %%G IN (%GSDL3SRCHOME%\build.properties) DO ( 19 if "%%G"=="tomcat.server" set SOLR_HOST=%%H 20 if "%%G"=="tomcat.port" set SOLR_PORT=%%H 22 if "%%G"=="tomcat.server" set SOLR_HOST=%%H& set FOUNDPROPS=!FOUNDPROPS!found 23 if "%%G"=="tomcat.port" set SOLR_PORT=%%H& set FOUNDPROPS=!FOUNDPROPS!found 24 :: break out of the loop as soon as both properties are found 25 if "!FOUNDPROPS!" == "foundfound" goto foundall 21 26 ) 27 endlocal 28 29 :foundall 22 30 echo Tomcat host: %SOLR_HOST% 23 31 echo Tomcat port: %SOLR_PORT%
Note:
See TracChangeset
for help on using the changeset viewer.