Changeset 7802


Ignore:
Timestamp:
2004-07-22T14:34:40+12:00 (20 years ago)
Author:
kjdon
Message:

added tests so hopefully can run this more than once and it doesn't crap out. also moved some stuff from gs3-finalise.sh - finalise nowonly does the port and hostname stuff, and anything that can't be done before the configure/make/make install

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/gs3-prepare.sh

    r7790 r7802  
    66fi
    77
    8 #check that GSDL3HOME is set
    9 if test -z "$GSDL3HOME" ; then
    10   source gs3-setup.sh
    11 fi
     8source gs3-setup.sh
     9
     10gsdl3home=$GSDL3HOME
    1211
    1312if test -z "$CVSROOT" ; then
     
    2423# now check out extra bits
    2524cd packages
    26 cvs co mgpp
     25if [ ! -d mgpp ]; then
     26    cvs co -P mgpp
     27fi
    2728cd $GSDL3HOME
    2829
     30#### TOMCAT ####
     31cd comms/jakarta/
    2932# unpack tomcat and rename directory
    30 cd comms/jakarta/
    31 unzip jakarta-tomcat-4.1.30.zip
    32 mv jakarta-tomcat-4.1.30 tomcat
     33if [ ! -d tomcat ]; then
     34    unzip jakarta-tomcat-4.1.30.zip
     35    mv jakarta-tomcat-4.1.30 tomcat
     36fi
     37#edit the tomcat setclasspath script to add our classpath
     38if [ ! -f ./tomcat/bin/setclasspath.sh.orig ]; then
     39    mv ./tomcat/bin/setclasspath.sh ./tomcat/bin/setclasspath.sh.orig
     40    cat ./tomcat/bin/setclasspath.sh.orig | sed 's,CLASSPATH=,CLASSPATH=\"$CLASSPATH\":,' > ./tomcat/bin/setclasspath.sh
     41fi
     42#edit the server config file
     43if ! grep -q gsdl3 ./tomcat/conf/server.xml; then
     44    cat ./tomcat/conf/server.xml | sed "s,<\!-- Tomcat Root Context -->,<\!-- GSDL3 Service --><Context path=\"/gsdl3\" docBase=\"${gsdl3home}/web\" debug=\"1\" reloadable=\"true\"><Resources allowLinking='true'/></Context><\!-- Tomcat Root Context -->," > server.xml.tmp
     45    mv server.xml.tmp ./tomcat/conf/server.xml
     46fi
     47#make everyone happy by giving the right permissions to the shell scripts
     48chmod a+x ./tomcat/bin/*.sh
     49
    3350cd $GSDL3HOME
    3451
    35 # unpack the soap stuff
     52# Edit the web/WEB-INF/web.xml to set gsdl3home
     53if [ ! -f ./web/WEB-INF/web.xml ]; then
     54    sed "s|@gsdl3home@|${gsdl3home}|" ./web/WEB-INF/web.xml.in > ./web/WEB-INF/web.xml
     55fi
     56
     57#### SOAP ####
    3658cd comms/soap
    37 tar xzf soap-bin-2.2.tar.gz
    38 mv soap-2_2 soap
     59# unpack soap and rename directory
     60if [ ! -d soap ]; then
     61    unzip soap-bin-2.3.1.zip
     62    mv soap-2_3_1 soap
     63    cp soap/lib/soap.jar $GSDL3HOME/lib/java
     64# move the localsite deployment description into the soap webapp - localsite comes predeployed
     65    cp DeployedServices.ds soap/webapps/soap/
     66fi
    3967cd $GSDL3HOME
    4068
    41 #setup sample collections
     69# edit the localsite soap server class, and class template - add in gsdl3home
     70if grep -q "\@gsdl3home\@" ./src/java/org/greenstone/gsdl3/SOAPServer.java.in; then
     71    sed "s|@gsdl3home@|${gsdl3home}|" ./src/java/org/greenstone/gsdl3/SOAPServer.java.in > ./src/java/org/greenstone/gsdl3/SOAPServer.tmp && mv ./src/java/org/greenstone/gsdl3/SOAPServer.tmp ./src/java/org/greenstone/gsdl3/SOAPServer.java.in
     72    sed "s|@gsdl3home@|${gsdl3home}|" ./src/java/org/greenstone/gsdl3/SOAPServerLocalsite.java.in > ./src/java/org/greenstone/gsdl3/SOAPServer.java
     73fi
     74
     75#### SAMPLE COLLECTIONS ####
     76# how can we stop these being done more than once? and do we need to?
    4277cd web/sites/localsite/collect
    4378# unpack import, index and metadata
     
    78113
    79114
    80 #edit the tomcat setclasspath script to add our classpath
    81 cat comms/jakarta/tomcat/bin/setclasspath.sh | sed 's,CLASSPATH=,CLASSPATH=\"$CLASSPATH\":,' > setclasspath.sh
    82 mv comms/jakarta/tomcat/bin/setclasspath.sh comms/jakarta/tomcat/bin/setclasspath.bak.sh
    83 mv setclasspath.sh comms/jakarta/tomcat/bin/setclasspath.sh
    84115
    85 #edit the server config file
    86 mv comms/jakarta/tomcat/conf/server.xml comms/jakarta/tomcat/conf/server.xml.orig
    87 cat comms/jakarta/tomcat/conf/server.xml.orig | sed "s,<\!-- Tomcat Root Context -->,<\!-- GSDL3 Service --><Context path=\"/gsdl3\" docBase=\"@gsdl3home@/web\" debug=\"1\" reloadable=\"true\"><Resources allowLinking='true'/></Context><\!-- Tomcat Root Context -->," > comms/jakarta/tomcat/conf/server.xml.in
    88116
    89 #make everyone happy by giving the right permissions to the shell scripts
    90 chmod a+x comms/jakarta/tomcat/bin/*.sh
    91117
Note: See TracChangeset for help on using the changeset viewer.