1 | #!/bin/bash
|
---|
2 |
|
---|
3 | if [ ! -d $PREPARE_SDCARD_GSDL3HOME ] ; then
|
---|
4 | # First time install has been run => do a full copy
|
---|
5 | mode="Installing"
|
---|
6 |
|
---|
7 | else
|
---|
8 | # Only need to regenerate 'lib' folder
|
---|
9 | mode="Updating"
|
---|
10 | fi
|
---|
11 |
|
---|
12 | echo "#---"
|
---|
13 | echo "# $mode $GSDL3HOME -> $PREPARE_SDCARD_GSDL3HOME"
|
---|
14 | echo "# (this may take several minutes)"
|
---|
15 | echo "#---"
|
---|
16 | echo ""
|
---|
17 |
|
---|
18 | if [ $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/{}
|
---|
25 | fi
|
---|
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 |
|
---|
37 | if [ ! -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
|
---|
41 | fi
|
---|
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 |
|
---|
49 | if [ ! -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
|
---|
53 | fi
|
---|
54 |
|
---|
55 | echo ""
|
---|
56 | echo "####"
|
---|
57 | echo "# If not already done so, run: "
|
---|
58 | echo "# ./PREPARE-JAVA-TO-DEX.sh"
|
---|
59 | echo "# to cross-compile the Greenstone code and supporting JAR files"
|
---|
60 | echo "####"
|
---|
61 | echo ""
|
---|
62 |
|
---|
63 |
|
---|
64 |
|
---|