[23925] | 1 |
|
---|
[23884] | 2 | if [ "x$ANDROID_SDK_HOME" = "x" ] ; then
|
---|
[23925] | 3 | if [ ! -e setup-android.bash ] ; then
|
---|
| 4 | echo "Unable to find 'setup-android.bash'. You either need to:"
|
---|
| 5 | echo " 1) copy setup-android.bash.in to setup-android.bash and"
|
---|
| 6 | echo " edit **ANDROID_SDK_HOME** to point to where this is located"
|
---|
| 7 | echo " on your file system, or"
|
---|
| 8 | echo " 2) Explicitly set the environment variable ANDROID_SDK_HOME"
|
---|
| 9 | echo " and make sure 'dx' is on your PATH"
|
---|
| 10 | exit
|
---|
| 11 | else
|
---|
| 12 | source setup-android.bash
|
---|
| 13 | fi
|
---|
[23884] | 14 | fi
|
---|
| 15 |
|
---|
[23882] | 16 | export IJETTY_HOME=`pwd`
|
---|
[23885] | 17 | export IJOS=`uname | sed 's/^cygwin.*$/cygwin/i' | sed 's/^mingw.*$/mingw/i'`
|
---|
[23882] | 18 |
|
---|
| 19 | if [ "x$GSDL3HOME" = "x" ] ; then
|
---|
| 20 | echo "Setting GSDL3HOME to '../../web'"
|
---|
| 21 | export GSDL3HOME=../../web
|
---|
| 22 | else
|
---|
| 23 | echo "Using existing value of GSDL3HOME: '$GSDL3HOME'"
|
---|
| 24 | fi
|
---|
| 25 |
|
---|
| 26 | if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
|
---|
| 27 |
|
---|
| 28 | if [ "x$IJOS" = "xcygwin" ] ; then
|
---|
| 29 |
|
---|
| 30 | possible_drives=`ls -d /cygdrive/*/jetty/webapps 2>/dev/null`
|
---|
| 31 | num_possible_drives=`echo $possible_drives | wc -l`
|
---|
| 32 |
|
---|
| 33 | if [ $num_possible_drives = "0" ] ; then
|
---|
| 34 | echo " Failed to automatically find and sdcard webapps folders"
|
---|
| 35 | echo " Explicitly set the environment variable SDCARD_WEBAPPS to control"
|
---|
| 36 | echo " installation on the Android phone"
|
---|
| 37 | else
|
---|
| 38 | if [ $num_possible_drives = "1" ] ; then
|
---|
| 39 | export SDCARD_WEBAPPS=${possible_drives[0]}
|
---|
| 40 | else
|
---|
| 41 | echo " Detected more than one possible sdcard webapps folders:"
|
---|
| 42 | echo " $possible_drives"
|
---|
| 43 | echo " Explicitly set the environment variable SDCARD_WEBAPPS to control"
|
---|
| 44 | echo " which one is used for installation on the Android phone"
|
---|
| 45 | fi
|
---|
| 46 | fi
|
---|
| 47 | fi
|
---|
| 48 | fi
|
---|
| 49 |
|
---|
| 50 | if [ "x$SDCARD_WEBAPPS" != "x" ] ; then
|
---|
| 51 | export SDCARD_GSDL3HOME=$SDCARD_WEBAPPS/greenstone3/
|
---|
| 52 | echo ""
|
---|
| 53 | echo " Using:"
|
---|
| 54 | echo " $SDCARD_GSDL3HOME"
|
---|
| 55 | echo " as the installation point for the Greenstone servlet"
|
---|
| 56 | echo ""
|
---|
| 57 | fi
|
---|
| 58 |
|
---|
| 59 |
|
---|
| 60 | if [ "x$IJETTY_PORT" = "x" ] ; then
|
---|
| 61 | export IJETTY_PORT=8080
|
---|
| 62 | echo ""
|
---|
| 63 | echo " Setting IJETTY_PORT to 8080"
|
---|
| 64 | echo " Explicityly set this environment variable to override this default"
|
---|
| 65 | echo ""
|
---|
| 66 | else
|
---|
| 67 | echo ""
|
---|
| 68 | echo " Using IJETTY PORT = $IJETTY_PORT"
|
---|
| 69 | echo ""
|
---|
| 70 | fi
|
---|
| 71 |
|
---|
| 72 | echo "+ Your environment has now been set up with iJetty extension for Greenstone"
|
---|
| 73 |
|
---|
| 74 |
|
---|