Ignore:
Timestamp:
2012-05-20T19:48:37+12:00 (12 years ago)
Author:
davidb
Message:

Restructuring of scripts to use 'i-jetty' webapps preparation area

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/i-jetty/trunk/src/setup.bash

    r25606 r25623  
     1
     2
    13
    24if [ "x$ANDROID_SDK_HOME" = "x" ] ; then
    35  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"
     6    echo "Unable to find 'setup-android.bash'.  You either need to:" 1>&2
     7    echo "  1) copy setup-android.bash.in to setup-android.bash and" 1>&2
     8    echo "     edit **ANDROID_SDK_HOME** to point to where this is located" 1>&2
     9    echo "     on your file system, or" 1>&2
     10    echo "  2) Explicitly set the environment variable ANDROID_SDK_HOME" 1>&2
     11    echo "     and make sure 'dx' is on your PATH" 1>&2
    1012    exit
    1113  else
     
    2426fi
    2527
    26 if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
     28export PREPARE_SDCARD_GSDL3HOME=$IJETTY_HOME/webapps/greenstone3/
    2729
    28   possible_drives=""
    29   if [ "x$IJOS" = "xcygwin" ] ; then
     30export WITHIN_SDCARD_WEBAPPS=/sdcard/jetty/webapps
     31export WITHIN_SDCARD_GSDL3HOME=$WITHIN_SDCARD_WEBAPPS/greenstone3
    3032
    31     possible_drives=`ls -d /cygdrive/*/jetty/webapps 2>/dev/null`
    32   elif [ "x$IJOS" = "xmingw" ] ; then
    33     possible_drives=`ls -d /*/jetty/webapps 2>/dev/null`
    34   else
    35     # Linux and MacOS
    36     possible_drives=`ls -d /mnt/*/jetty/webapps 2>/dev/null`
    37   fi
    38 
    39   num_possible_drives=`echo $possible_drives | wc -l`
    40 
    41   if [ $num_possible_drives = "0" ] ; then
    42       echo "    Failed to automatically find and sdcard webapps folders"
    43       echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
    44       echo "      installation on the Android phone"   
    45   elif [ $num_possible_drives = "1" ] ; then
    46       export SDCARD_WEBAPPS=${possible_drives[0]}
    47   else
    48       echo "    Detected more than one possible sdcard webapps folders:"
    49       echo "      $possible_drives"
    50       echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
    51       echo "      which one is used for installation on the Android phone"   
    52   fi
    53 fi
    54 
    55 export PREPARE_SDCARD_GSDL3HOME=`pwd`/war/greenstone3/
    56 
    57 if [ "x$SDCARD_WEBAPPS" != "x" ] ; then
    58   export SDCARD_GSDL3HOME=$SDCARD_WEBAPPS/greenstone3/
    59   echo ""
    60   echo "  Using:"
    61   echo ""
    62   echo "     $PREPARE_SDCARD_GSDL3HOME"
    63   echo ""
    64   echo "  as the *preparation* area for the Greenstone servlet"
    65   echo ""
    66   echo "  Using:"
    67   echo ""
    68   echo "     $SDCARD_GSDL3HOME"
    69   echo ""
    70   echo "  as the *installation* point for the Greenstone servlet"
    71   echo ""
    72 fi
     33echo ""
     34echo "  Using:"
     35echo ""
     36echo "     $PREPARE_SDCARD_GSDL3HOME"
     37echo ""
     38echo "  as the webapps *preparation* area for the Greenstone servlet"
     39echo ""
     40echo "  Using:"
     41echo ""
     42echo "     $WITHIN_SDCARD_GSDL3HOME"
     43echo ""
     44echo "  as the *installation* point for the Greenstone servlet on the sd-card"
     45echo ""
    7346
    7447
     
    9669echo "to install jetty on your device, followed by"
    9770echo ""
    98 echo "  ./WEBAPP-ROOT-TO-SDCARD.sh"
     71echo "  ./PREPARE-WEBAPPS-GREENSTONE-ROOT-FOR-IJETTY.sh"
    9972echo ""
    100 echo "to set up tGreenstone's 'web' directory within the i-jetty webapps area."
     73echo "to set up Greenstone3's 'web' directory for the i-jetty webapps area."
     74echo ""
    10175echo "Then:"
    10276echo ""
    10377echo "  ./JAVA-TO-DEX.sh"
    10478echo ""
    105 echo "to cross-compile Greenstone java code to the Android DEX format."
     79echo "to cross-compile Greenstone java code to the Android DEX format and add it to the webapps area."
    10680echo ""
    10781echo "Finally run:"
    10882echo ""
    109 echo "  ./DEX-TO-SDCARD.sh"
     83echo "  ./IJETTY-PUSH.sh webapps/greenstone3"
    11084echo ""
    111 echo "to install the cross-compiled files on the Android device"
     85echo "to install the Greenstone3's webapps folder (including cross-compiled DEX files) on the Android device"
    11286echo "======"
    11387echo ""
Note: See TracChangeset for help on using the changeset viewer.