Changeset 23973

Show
Ignore:
Timestamp:
29.04.2011 16:28:16 (9 years ago)
Author:
ak19
Message:

Adjustments to configure-web and reset-gsdlhome. Note that at present, if using an SVN version of GS2, then before you tell GS2 that you've changed its installation location, you need to first run make apache-for-dist in the top level folder. This will allow you to run the RESET-GREENSTONE.sh script in GS svn's other-projects. That script will adjust the apache config files before running gsicontrol.sh's reset-gsdlhome target.

Files:
1 modified

Legend:

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

    r23966 r23973  
    141141 
    142142function configure-web { 
     143    if test ! -e "gs2-server.app/Contents/document.wflow" ; then 
     144    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "gs2-server.app/Contents/document.wflow.in" > "gs2-server.app/Contents/document.wflow" 
     145    fi 
     146    if test ! -e "gli.app/Contents/document.wflow" ; then 
     147    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "gli.app/Contents/document.wflow.in" > "gli.app/Contents/document.wflow" 
     148    fi 
     149    if test ! -e "client-gli.app/Contents/document.wflow" ; then 
     150    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "client-gli.app/Contents/document.wflow.in" > "client-gli.app/Contents/document.wflow" 
     151    fi 
     152    if test ! -e "gems.app/Contents/document.wflow" ; then 
     153    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "gems.app/Contents/document.wflow.in" > "gems.app/Contents/document.wflow" 
     154    fi 
     155 
    143156    configure-cgi 
    144157    configure-apache $1 
     
    147160# forces configure-cgi by deleting gsdlsite.cfg 
    148161function reset-gsdlhome { 
    149     echo "" ; 
     162    echo "" ; 
    150163    if test -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then 
    151         /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 
    152         echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ; 
    153         echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 
    154     fi 
    155  
    156     log4jprop=$GSDLHOME/lib/java/log4j.properties 
    157     sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop" 
    158      
    159     sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "gs2-server.app/Contents/document.wflow.in" > "gs2-server.app/Contents/document.wflow" 
    160     sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "gli.app/Contents/document.wflow.in" > "gli.app/Contents/document.wflow" 
    161     sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "client-gli.app/Contents/document.wflow.in" > "client-gli.app/Contents/document.wflow" 
    162     sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "gems.app/Contents/document.wflow.in" > "gems.app/Contents/document.wflow" 
     164    /bin/mv "$GSDLHOME/$cgibin/gsdlsite.cfg" "$GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 
     165    echo "**** Regenerating $GSDLHOME/$cgibin/gsdlsite.cfg" ; 
     166    echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ; 
     167    fi 
     168     
     169    log4jprop=$GSDLHOME/lib/java/log4j.properties 
     170    sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop" 
     171    
     172    rm -f "gs2-server.app/Contents/document.wflow" 
     173    rm -f "gli.app/Contents/document.wflow" 
     174    rm -f "client-gli.app/Contents/document.wflow" 
     175    rm -f "gems.app/Contents/document.wflow" 
    163176 
    164177    configure-web $1