Ignore:
Timestamp:
2011-05-03T19:48:34+12:00 (13 years ago)
Author:
ak19
Message:

Added in the reset_greenstone.sh code

File:
1 edited

Legend:

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

    r23975 r23982  
    11#!/bin/bash
     2
     3storedir="`pwd`"
     4thisdir="`dirname \"$0\"`"
     5thisdir="`cd \"$thisdir\" && pwd`"
     6cd "$thisdir"
     7source setup.bash
    28
    39testdone=0
     
    3137    if test ! -e "$GSDLHOME/$cgibin/gsdlsite.cfg" ; then
    3238    echo "Configuring $cgibin/gsdlsite.cfg" ;
    33     sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$cgibin/gsdlsite.cfg.in" > "$cgibin/gsdlsite.cfg" ;
     39    echo "# **** This file is automatically generated, do not edit ****" > "$cgibin/gsdlsite.cfg" ;
     40    echo "# For local customization of Greenstone, edit gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
     41    sed "s@\*\*GSDLHOME\*\*@$GSDLHOME@g" "$cgibin/gsdlsite.cfg.in" >> "$cgibin/gsdlsite.cfg" ;
    3442    else
    3543    echo "WARNING: Nothing done for make configure-cgi." ;
     
    159167    echo "**** Previous version of file now $GSDLHOME/$cgibin/gsdlsite.cfg.bak" ;
    160168    fi
     169
     170    apache_home_os="$GSDLHOME/apache-httpd/$GSDLOS$GSDLARCH"
     171
     172    if test ! -e "$apache_home_os/bin/apachectl.in" ; then
     173    make apache-for-dist
     174    fi
     175   
     176    replace_list="conf/extra/httpd-dav.conf \
     177            conf/extra/httpd-manual.conf \
     178            conf/extra/httpd-autoindex.conf \
     179            conf/extra/httpd-vhosts.conf \
     180            conf/extra/httpd-ssl.conf \
     181            conf/extra/httpd-multilang-errordoc.conf \
     182            conf/original/extra/httpd-dav.conf \
     183            conf/original/extra/httpd-manual.conf \
     184            conf/original/extra/httpd-autoindex.conf \
     185            conf/original/extra/httpd-vhosts.conf \
     186            conf/original/extra/httpd-ssl.conf \
     187            conf/original/extra/httpd-multilang-errordoc.conf \
     188            conf/original/httpd.conf\
     189            lib/apr-util-1/apr_dbd_odbc.la \
     190            lib/apr-util-1/apr_dbd_sqlite3.la \
     191            lib/pkgconfig/apr-util-1.pc \
     192            lib/pkgconfig/apr-1.pc \
     193            lib/libaprutil-1.la \
     194            lib/libapr-1.la \
     195            build/config_vars.mk \
     196            build/config.nice \
     197            build/apr_rules.mk \
     198            bin/dbmmanage \
     199            bin/apu-1-config \
     200            bin/apr-1-config \
     201            include/ap_config_auto.h \
     202            include/ap_config_layout.h"
     203
     204    for one_file in apachectl envvars envvars-std ; do
     205    /bin/cp "$apache_home_os/bin/$one_file.in" "$apache_home_os/bin/$one_file"
     206    done
     207   
     208    for one_file in $replace_list ; do
     209    /bin/cp "$apache_home_os/$one_file.in" "$apache_home_os/$one_file"
     210    done
     211   
     212    /bin/cp "$apache_home_os/bin/apr-1-config.in" "$apache_home_os/bin/apr-1-config"
     213   
     214    /bin/cp "$apache_home_os/bin/apu-1-config.in" "$apache_home_os/bin/apu-1-config"
     215   
     216    /bin/cp "$apache_home_os/build/config_vars.mk.in" "$apache_home_os/build/config_vars.mk"
     217   
     218    bash "$apache_home_os/install-bindist.sh" "$apache_home_os"
    161219   
    162220    log4jprop=$GSDLHOME/lib/java/log4j.properties
    163221    sed "s^@gsdl2home@^$GSDLHOME^g" "$log4jprop.in" > "$log4jprop"
    164    
     222
    165223    for one_file in gs2-server.app gli.app client-gli.app gems.app ; do
    166224    if test -e "$one_file/Contents/document.wflow" ; then
    167225        rm -f "$one_file/Contents/document.wflow"
    168226    fi
    169     done ;
     227    done
    170228
    171229    configure-web $1
     
    296354esac
    297355
     356# jump back to directory we originally got called from
     357cd "$storedir"
    298358exit;
Note: See TracChangeset for help on using the changeset viewer.