Show
Ignore:
Timestamp:
21.10.2011 14:29:07 (8 years ago)
Author:
ak19
Message:

GSIControl.sh' reset-gsdlhome target should update the path to perl at the top of the gliserver.pl file to use the new gsdlhome. This was necessary for the equivalent Windows batch script, but the change is carried over to the .sh script for consistency.

Files:
1 modified

Legend:

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

    r24760 r24787  
    176176    echo "" ; 
    177177    relocate=yes ; 
     178 
     179# don't just update gsdlsite.cfg, but also the path to perl at the top of gliserver.pl 
     180# if this is a perl included with the Greenstone distribution 
    178181    if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then 
    179182    stored_gsdlhome=`egrep "^gsdlhome" "$cgibin/gsdlsite.cfg" | awk '{print $2}'` ; 
     
    182185        echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ; 
    183186        echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 
     187 
     188        if test -d "$GSDLHOME/bin/$GSDLOS/perl" ; then 
     189        gliserverfile=$GSDLHOME/$cgibin/gliserver.pl ; 
     190        /bin/cp "$gliserverfile" "$gliserverfile.bak" ;      
     191        sed "s@$stored_gsdlhome@$GSDLHOME@g" "$gliserverfile.bak" > "$gliserverfile" ; 
     192        rm -f "$gliserverfile.bak" ; 
     193        fi 
     194 
    184195    else 
    185196        relocate=