source: gs3-extensions/i-jetty/trunk/src/PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh@ 25625

Last change on this file since 25625 was 25623, checked in by davidb, 12 years ago

Restructuring of scripts to use 'i-jetty' webapps preparation area

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3if [ ! -d $PREPARE_SDCARD_GSDL3HOME ] ; then
4 # First time install has been run => do a full copy
5 mode="Installing"
6
7else
8 # Only need to regenerate 'lib' folder
9 mode="Updating"
10fi
11
12echo "#---"
13echo "# $mode $GSDL3HOME -> $PREPARE_SDCARD_GSDL3HOME"
14echo "# (this may take several minutes)"
15echo "#---"
16echo ""
17
18if [ $mode = "Installing" ] ; then
19 (cd $GSDL3HOME && find . -type d ) \
20 | egrep -v '/\.svn' \
21 | egrep -v 'sites/' \
22 | egrep -v 'WEB-INF/classes' \
23 | egrep -v 'WEB-INF/lib' \
24 | xargs -I {} mkdir -p $PREPARE_SDCARD_GSDL3HOME/{}
25fi
26
27(cd $GSDL3HOME && find . -type f ) \
28 | egrep -v '/\.svn' \
29 | egrep -v 'sites/' \
30 | egrep -v 'WEB-INF/classes' \
31 | egrep -v 'WEB-INF/lib' \
32 | xargs -I {} /bin/cp -u -v $GSDL3HOME/{} $PREPARE_SDCARD_GSDL3HOME/{}
33
34/bin/cp resources/index.html $PREPARE_SDCARD_GSDL3HOME/.
35/bin/cp resources/web.xml $PREPARE_SDCARD_GSDL3HOME/WEB-INF/.
36
37if [ ! -d $PREPARE_SDCARD_GSDL3HOME/sites/localsite ] ; then
38 echo "Creating 'localsite' in $PREPARE_SDCARD_GSDLHOME"
39 mkdir $PREPARE_SDCARD_GSDL3HOME/sites/localsite
40 mkdir $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect
41fi
42
43/bin/cp -u -v $GSDL3HOME/sites/localsite/siteConfig.xml $PREPARE_SDCARD_GSDL3HOME/sites/localsite/.
44
45/bin/cp -u -v -r $GSDL3HOME/sites/localsite/etc $PREPARE_SDCARD_GSDL3HOME/sites/localsite/.
46
47/bin/cp -u -v -r $GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect/.
48
49if [ ! -d $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo/index ] ; then
50 pushd $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo
51 unzip index.zip
52 popd
53fi
54
55echo ""
56echo "####"
57echo "# If not already done so, run: "
58echo "# ./PREPARE-JAVA-TO-DEX.sh"
59echo "# to cross-compile the Greenstone code and supporting JAR files"
60echo "####"
61echo ""
62
63
64
Note: See TracBrowser for help on using the repository browser.