Changeset 27521

Show
Ignore:
Timestamp:
30.05.2013 20:53:34 (6 years ago)
Author:
ak19
Message:

Resetting gsdlhome (reset-gsdlhome command) should not just update the perl shebang for gliserver.pl but also checksum.pl and metadata-server.pl

Location:
main/trunk/greenstone2
Files:
2 modified

Legend:

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

    r24904 r27521  
    207207 
    208208:relocate 
    209 :: The path to the included perl at the top of gliserver.pl needs to use the new gsdlhome 
    210 :: On windows, the path in gliserver.pl uses backslashes 
     209:: The path to the included perl at the top of gliserver.pl and other cgi-bin perl files needs to use the new gsdlhome 
     210:: On windows, the path in gliserver.pl and the others uses backslashes 
    211211for /F "delims=*" %%T in ('"echo !gshome!| !_sed! s@\\@\\\\@g"') do set safeoldhome=%%T 
    212212for /F "delims=*" %%T in ('"echo !gsdlhome!| !_sed! s@\\@\\\\@g"') do set safenewhome=%%T 
     
    215215  type "!cgibin!\gliserver.pl.bak" | !_sed! "s@!safeoldhome!@!safenewhome!@g" > "!cgibin!\gliserver.pl" 
    216216  del "!cgibin!\gliserver.pl.bak" 
     217 
     218  copy "!cgibin!\metadata-server.pl" "!cgibin!\metadata-server.pl.bak" 
     219  type "!cgibin!\metadata-server.pl.bak" | !_sed! "s@!safeoldhome!@!safenewhome!@g" > "!cgibin!\metadata-server.pl" 
     220  del "!cgibin!\metadata-server.pl.bak" 
     221 
     222  copy "!cgibin!\checksum.pl" "!cgibin!\checksum.pl.bak" 
     223  type "!cgibin!\checksum.pl.bak" | !_sed! "s@!safeoldhome!@!safenewhome!@g" > "!cgibin!\checksum.pl" 
     224  del "!cgibin!\checksum.pl.bak" 
    217225) 
    218226set safenewhome= 
  • main/trunk/greenstone2/gsicontrol.sh

    r24953 r27521  
    179179    relocate=yes ; 
    180180 
    181 # don't just update gsdlsite.cfg, but also the path to perl at the top of gliserver.pl 
     181# don't just update gsdlsite.cfg, but also the path to perl at the top of gliserver.pl and the other cgi-bin perl files 
    182182# if this is a perl included with the Greenstone distribution 
    183183    if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then 
     
    193193        sed "s@$stored_gsdlhome@$GSDLHOME@g" "$gliserverfile.bak" > "$gliserverfile" ; 
    194194        rm -f "$gliserverfile.bak" ; 
     195 
     196        metaserverfile=$GSDLHOME/$cgibin/metadata-server.pl ; 
     197        /bin/cp "$metaserverfile" "$metaserverfile.bak" ;        
     198        sed "s@$stored_gsdlhome@$GSDLHOME@g" "$metaserverfile.bak" > "$metaserverfile" ; 
     199        rm -f "$metaserverfile.bak" ; 
     200 
     201        checksumfile=$GSDLHOME/$cgibin/checksum.pl ; 
     202        /bin/cp "$checksumfile" "$checksumfile.bak" ;        
     203        sed "s@$stored_gsdlhome@$GSDLHOME@g" "$checksumfile.bak" > "$checksumfile" ; 
     204        rm -f "$checksumfile.bak" ; 
    195205        fi 
    196206