Changeset 24759


Ignore:
Timestamp:
2011-10-14T19:02:19+13:00 (13 years ago)
Author:
ak19
Message:

Fix for spaces in filepath when launching the apache webserver, since that calls gsicontrol with the reset-gsdlhome target, which needs to retrieve the gsdlhome property from the cgi-bin\gsdlhome. This property being a path value can contain spaces, so the delimiter separating the gsdlhome property key from its value cannot be (or contain) spaces. It's now been made a tab. Need to still test this on Linux.

Location:
main/trunk/greenstone2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/cgi-bin/gsdlsite.cfg.in

    r23734 r24759  
    55# points to the GSDLHOME directory
    66# This must be set, and must point to the top level Greenstone directory
    7 # (usually gsdl or Greenstone)
    8 gsdlhome    **GSDLHOME**
     7# (usually gsdl or Greenstone).
     8# Put quotes around the GSDLHOME path value if it contains any spaces.
     9# It's important that Tab(s) and not any spaces are used (as a delimiter)
     10# to separate the gsdlhome property key from its value, since the value
     11# is a filepath and can therefore contain spaces of its own.
     12gsdlhome    **GSDLHOME**
    913
    1014# this is the http address of GSDLHOME
  • main/trunk/greenstone2/gsicontrol.bat

    r24300 r24759  
    184184if not exist "%GSDLHOME%\%cgibin%\gsdlsite.cfg" goto relocate
    185185
    186 FOR /F "tokens=2" %%G IN ('findstr /R ^gsdlhome "%GSDLHOME%\%cgibin%\gsdlsite.cfg"') do set gshome=%%G
     186:: In gsdlsite.cfg, the tab char (and only the tab char) NEEDS to be the
     187:: delimiter between the gsdlhome property name and its value, the path.
     188:: The tab as delimiter is necessary just for that property line, since
     189:: the path can contain spaces and we therefore can't have space as delim.
     190FOR /F "tokens=2 delims=    " %%G IN ('findstr /R ^gsdlhome "%GSDLHOME%\%cgibin%\gsdlsite.cfg"') do set gshome=%%G
    187191:: before string comparison, remove any quotes around gsdlhome value defined in config file
    188192if not [%gshome%] == [] set gshome=%gshome:"=%
Note: See TracChangeset for help on using the changeset viewer.