source: gs3-extensions/i-jetty/trunk/src/WEBAPP-ROOT-TO-SDCARD.sh@ 23931

Last change on this file since 23931 was 23931, checked in by davidb, 10 years ago

Some fine-tuning of scripts, as the result of a fresh pass at setting up Greenstone-3 on an Android device

File size: 1.6 KB
Line 
1#!/bin/bash
2
3if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
4 echo "Environment variable SDCARD_WEBAPPS undefined"
5 echo " => No valid directory to install to on Android device"
6 echo " => Did you run setup.bash before the Android device was in disk mode?"
7 echo " => Alternatively, set the environment variable explicitly"
8 exit -1
9fi
10
11
12if [ ! -d $SDCARD_GSDL3HOME ] ; then
13 # First time install has been run => do a full copy
14 mode="Installing"
15
16else
17 # Only need to regenerate 'lib' folder
18 mode="Updating"
19fi
20
21echo "#---"
22echo "# $mode $GSDL3HOME -> $SDCARD_GSDL3HOME"
23echo "# (this may take several minutes)"
24echo "#---"
25echo ""
26
27if [ $mode = "Installing" ] ; then
28 (cd $GSDL3HOME && find . -type d ) \
29 | egrep -v '/\.svn' \
30 | egrep -v 'sites/' \
31 | egrep -v 'WEB-INF/classes' \
32 | egrep -v 'WEB-INF/lib' \
33 | xargs -I {} mkdir -p $SDCARD_GSDL3HOME/{}
34fi
35
36(cd $GSDL3HOME && find . -type f ) \
37 | egrep -v '/\.svn' \
38 | egrep -v 'sites/' \
39 | egrep -v 'WEB-INF/classes' \
40 | egrep -v 'WEB-INF/lib' \
41 | xargs -I {} /bin/cp -u -v $GSDL3HOME/{} $SDCARD_GSDL3HOME/{}
42
43
44if [ ! -d $SDCARD_GSDL3HOME/sites/localsite ] ; then
45 echo "Creating 'localsite' in $SDCARD_GSDLHOME"
46 mkdir $SDCARD_GSDL3HOME/sites/localsite
47 mkdir $SDCARD_GSDL3HOME/sites/localsite/collect
48fi
49
50/bin/cp -u -v $GSDL3HOME/sites/localsite/siteConfig.xml $SDCARD_GSDL3HOME/sites/localsite/.
51
52/bin/cp -u -v -r $GSDL3HOME/sites/localsite/etc $SDCARD_GSDL3HOME/sites/localsite/.
53
54/bin/cp -u -v -r $GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo $SDCARD_GSDL3HOME/sites/localsite/collect/.
55
56
57
58
59
Note: See TracBrowser for help on using the repository browser.