source: gs3-extensions/i-jetty/trunk/src/setup.bash@ 23882

Last change on this file since 23882 was 23882, checked in by davidb, 13 years ago

Initial cut at support scripts to install Greenstone 3 on an Android device

File size: 1.9 KB
Line 
1
2export IJETTY_HOME=`pwd`
3export IJOS=`uname | sed 's/^cygwin.*$/cygwin/i'`
4
5if [ "x$GSDL3HOME" = "x" ] ; then
6 echo "Setting GSDL3HOME to '../../web'"
7 export GSDL3HOME=../../web
8else
9 echo "Using existing value of GSDL3HOME: '$GSDL3HOME'"
10fi
11
12if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
13
14 if [ "x$IJOS" = "xcygwin" ] ; then
15
16 possible_drives=`ls -d /cygdrive/*/jetty/webapps 2>/dev/null`
17 num_possible_drives=`echo $possible_drives | wc -l`
18
19 if [ $num_possible_drives = "0" ] ; then
20 echo " Failed to automatically find and sdcard webapps folders"
21 echo " Explicitly set the environment variable SDCARD_WEBAPPS to control"
22 echo " installation on the Android phone"
23 else
24 if [ $num_possible_drives = "1" ] ; then
25 export SDCARD_WEBAPPS=${possible_drives[0]}
26 else
27 echo " Detected more than one possible sdcard webapps folders:"
28 echo " $possible_drives"
29 echo " Explicitly set the environment variable SDCARD_WEBAPPS to control"
30 echo " which one is used for installation on the Android phone"
31 fi
32 fi
33 fi
34fi
35
36if [ "x$SDCARD_WEBAPPS" != "x" ] ; then
37 export SDCARD_GSDL3HOME=$SDCARD_WEBAPPS/greenstone3/
38 echo ""
39 echo " Using:"
40 echo " $SDCARD_GSDL3HOME"
41 echo " as the installation point for the Greenstone servlet"
42 echo ""
43fi
44
45
46if [ "x$IJETTY_PORT" = "x" ] ; then
47 export IJETTY_PORT=8080
48 echo ""
49 echo " Setting IJETTY_PORT to 8080"
50 echo " Explicityly set this environment variable to override this default"
51 echo ""
52else
53 echo ""
54 echo " Using IJETTY PORT = $IJETTY_PORT"
55 echo ""
56fi
57
58echo "+ Your environment has now been set up with iJetty extension for Greenstone"
59
60if [ "x$ANDROID_HOME" = "x" ] ; then
61 export ANDROID_HOME=/cygdrive/c/Program\ Files/Android\ SDK/android-sdk-windows
62 export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
63
64 echo "+ Your environment has now been set up to run the Android SDK"
65fi
66
Note: See TracBrowser for help on using the repository browser.