Ignore:
Timestamp:
2011-07-20T15:06:40+12:00 (13 years ago)
Author:
ak19
Message:

Fixed a bug introduced with the reset-gsdlhome target where any non-standard collecthome value written into the gsdlsite.cfg was lost on startup since reset-gsdlhome always regenerated gsdlsite.cfg from the template file. Now the collecthome property is reinstated when the gsdlsite.cfg is generated, by taking this from the gsdlsite.cfg.bak file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/gsicontrol.bat

    r24006 r24295  
    204204
    205205:cfgcgi
     206:: Need to preserve the user-assigned collecthome property, if any
    206207if exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" goto cgimsg
    207208echo Configuring %cgibin%\gsdlsite.cfg
     
    209210echo # For local customization of Greenstone, edit gsdlsite.cfg.in >> "%cgibin%\gsdlsite.cfg"
    210211echo. >> "%cgibin%\gsdlsite.cfg"
     212
    211213for /F "delims=*" %%T in ('"echo %GSDLHOME%| %_sed% s@\\@\\\\@g"') do set safepath=%%T
    212214%_sed% "s@\*\*GSDLHOME\*\*@\"%safepath%\"@g" "%cgibin%\gsdlsite.cfg.in" >> "%cgibin%\gsdlsite.cfg"
    213215set safepath=
     216
     217if exist "%cgibin%\gsdlsite.cfg.bak" FOR /F "tokens=2" %%G IN ('findstr /R ^collecthome "%cgibin%\gsdlsite.cfg.bak"') do set colhome=%%G
     218if not "%colhome%" == "" echo collecthome %colhome% >> "%cgibin%\gsdlsite.cfg"& echo. >> "%cgibin%\gsdlsite.cfg"
     219set colhome=
     220
    214221goto cgifin
    215222
Note: See TracChangeset for help on using the changeset viewer.