source: gs3-extensions/android-war/trunk/src/PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh@ 26685

Last change on this file since 26685 was 25663, checked in by davidb, 12 years ago

Tidy up scripts and config files

  • Property svn:executable set to *
File size: 2.0 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
49echo "Removing .svn folders from copied 'lucene-jdbm-demo' collection"
50find $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo \
51 -type d -name ".svn" -exec /bin/rm -rf {} \; -print
52
53if [ ! -d $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo/index ] ; then
54 pushd $PREPARE_SDCARD_GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo
55 unzip index.zip
56 popd
57fi
58
59echo ""
60echo "####"
61echo "# If not already done so, run: "
62echo "# ./JAVA-TO-DEX.sh"
63echo "# to cross-compile the Greenstone code and supporting JAR files"
64echo "####"
65echo ""
66
67
68
Note: See TracBrowser for help on using the repository browser.