Index: /gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh
===================================================================
--- /gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh	(revision 25629)
+++ /gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh	(revision 25629)
@@ -0,0 +1,165 @@
+#!/bin/bash
+
+if [ "x$PREPARE_SDCARD_GSDL3HOME" = "x" ] ; then
+  echo "Environment variable PREPARE_SDCARD_GSDL3HOME undefined" 1>&2
+  exit -1
+fi
+
+
+JARS="axis.jar commons-lang3-3.0-beta.jar cp.jar \
+  gsdl3.jar gutil.jar \
+  LuceneWrapper3.jar \
+  jdbm.jar js.jar serializer.jar \
+  xercesImpl.jar xml-apis.jar"
+
+# LuceneWrapper.jar and xalan.jar used to be in the list,
+# but are now in modified-jars.  See README.txt in that
+# directory for details
+
+#---
+# Copy GS3 classes files to I-Jetty classes
+#---
+
+if [ -d classes ] ; then
+  echo "#---"
+  echo "# Regenerating directory: classes"
+  echo "#---"
+  /bin/rm -rf classes
+fi
+
+echo "#---"
+echo "# Copying Greenstone-3 classes to the I-Jetty extension"
+/bin/cp -rf "$GSDL3HOME/WEB-INF/classes" classes
+/bin/rm -rf classes/.svn
+
+echo "# Setting GSDL3HOME to match SD-Card on Android device"
+echo "#---"
+
+if [ "x$IJOS" = "xcygwin" -o "x$IJOS" = "xmingw" ] ; then
+  SDCARD_GSDL3HOME_ONDEVICE=`echo $PREPARE_SDCARD_GSDL3HOME | sed 's@^/.\+/war/@/sdcard/jetty/webapps/@'`
+else 
+  echo "Need to change mapped location of Android device on host machine" 
+  echo "But no support currently implemented for: $IJOS"
+  SDCARD_GSDL3HOME_ONDEVICE=$PREPARE_SDCARD_GSDL3HOME
+fi
+
+cat classes/global.properties \
+  | sed "s@^gsdl3\.home=.*@gsdl3.home=$SDCARD_GSDL3HOME_ONDEVICE@" \
+  | sed "s@^tomcat\.port=.*@tomcat.port=$IJETTY_PORT@" \
+  > classes/global.properties.android
+
+/bin/mv classes/global.properties.android classes/global.properties
+
+cat classes/log4j.properties \
+  | sed "s@^gsdl3\.home=.*@gsdl3.home=$SDCARD_GSDL3HOME_ONDEVICE@" \
+  > classes/log4j.properties.android
+
+/bin/mv classes/log4j.properties.android classes/log4j.properties
+
+
+#---
+# Copy selected GS3 Jar files to I-Jetty jars
+#---
+
+echo "#---"
+if [ -d jars ] ; then
+  echo "# Regenerating jars"
+  /bin/rm -rf jars
+else
+  echo "# Generating jars"
+fi
+echo "#---"
+mkdir jars
+
+for f in $JARS ; do
+  echo "  Copying from Greenstone-3 to I-Jetty: $f"
+  /bin/cp "$GSDL3HOME/WEB-INF/lib/$f" jars/.
+done
+
+echo "Overriding existings Greenstone jars with ones that needed tweaking for Android"
+/bin/cp -v modified-jars/* jars/.
+
+
+echo "Topping up 'jars' with Android specific jars"
+/bin/cp -v extra-jars/* jars/.
+
+
+#---
+# Generate dex file in I-Jetty 'classes' directory
+#---
+
+
+# If need more memory, add
+# -JXmx1024M
+
+OUTPUT_DEX=$IJETTY_HOME/classes/classes.dex 
+INPUT_DIR=$IJETTY_HOME/jars
+
+dxcmd="dx"
+
+if [ "x$IJOS" = "xcygwin" ] ; then
+  OUTPUT_DEX=`cygpath -w $OUTPUT_DEX`
+  INPUT_DIR=`cygpath -w $INPUT_DIR`
+  dxcmd="dx.bat"
+elif [ "x$IJOS" = "xmingw" ] ; then
+  OUTPUT_DEX=`echo $OUTPUT_DEX | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
+  INPUT_DIR=`echo $INPUT_DIR | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
+  dxcmd="cmd /c dx.bat"
+fi
+
+# add --verbose for more information
+$dxcmd --verbose --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
+
+##dx.bat --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
+
+if [ $? != 0 ] ; then
+  echo "Error(s) encountered when running 'dx'"
+  exit 
+fi
+
+#---
+# Zip up I-Jetty classes directory and put it in lib
+#---
+
+echo "#---"
+if [ -d lib ] ; then
+  echo "# Regenerating directory: lib"
+  /bin/rm -rf lib
+else 
+  echo "# Generating directory: lib"
+fi
+echo "#---"
+mkdir lib
+
+echo "#---"
+echo "Zipping up I-Jetty 'classes' and storing in 'lib'"
+echo "#---"
+(cd classes && zip -r ../lib/classes.zip . && cd ..)
+
+if [ $? != 0 ] ; then
+  echo "Error(s) encountered zipping up dexified 'lib' files"
+  exit 
+fi
+
+
+
+echo "#---"
+echo "# Copying dexified 'lib' servlet code to "
+echo "#   $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib"
+echo "#---"
+echo ""
+
+if [ -d $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib ] ; then
+  /bin/rm -rf $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib 
+fi
+
+/bin/cp -r lib $PREPARE_SDCARD_GSDL3HOME/WEB-INF/.
+
+
+
+echo ""
+echo "####"
+echo "# Run ./IJETTY-PUSH.sh \"webapps\" to install all the files needed on the Andorid device"
+echo "# Run ./IJETTY-PUSH.sh \"webapps/WEB-INF/lib\" to install the latest DEX files on the device"
+echo "####"
+echo ""
Index: 3-extensions/i-jetty/trunk/src/PREPARE-JAVA-TO-DEX.sh
===================================================================
--- /gs3-extensions/i-jetty/trunk/src/PREPARE-JAVA-TO-DEX.sh	(revision 25628)
+++ 	(revision )
@@ -1,165 +1,0 @@
-#!/bin/bash
-
-if [ "x$PREPARE_SDCARD_GSDL3HOME" = "x" ] ; then
-  echo "Environment variable PREPARE_SDCARD_GSDL3HOME undefined" 1>&2
-  exit -1
-fi
-
-
-JARS="axis.jar commons-lang3-3.0-beta.jar cp.jar \
-  gsdl3.jar gutil.jar \
-  LuceneWrapper3.jar \
-  jdbm.jar js.jar serializer.jar \
-  xercesImpl.jar xml-apis.jar"
-
-# LuceneWrapper.jar and xalan.jar used to be in the list,
-# but are now in modified-jars.  See README.txt in that
-# directory for details
-
-#---
-# Copy GS3 classes files to I-Jetty classes
-#---
-
-if [ -d classes ] ; then
-  echo "#---"
-  echo "# Regenerating directory: classes"
-  echo "#---"
-  /bin/rm -rf classes
-fi
-
-echo "#---"
-echo "# Copying Greenstone-3 classes to the I-Jetty extension"
-/bin/cp -rf "$GSDL3HOME/WEB-INF/classes" classes
-/bin/rm -rf classes/.svn
-
-echo "# Setting GSDL3HOME to match SD-Card on Android device"
-echo "#---"
-
-if [ "x$IJOS" = "xcygwin" -o "x$IJOS" = "xmingw" ] ; then
-  SDCARD_GSDL3HOME_ONDEVICE=`echo $PREPARE_SDCARD_GSDL3HOME | sed 's@^/.\+/war/@/sdcard/jetty/webapps/@'`
-else 
-  echo "Need to change mapped location of Android device on host machine" 
-  echo "But no support currently implemented for: $IJOS"
-  SDCARD_GSDL3HOME_ONDEVICE=$PREPARE_SDCARD_GSDL3HOME
-fi
-
-cat classes/global.properties \
-  | sed "s@^gsdl3\.home=.*@gsdl3.home=$SDCARD_GSDL3HOME_ONDEVICE@" \
-  | sed "s@^tomcat\.port=.*@tomcat.port=$IJETTY_PORT@" \
-  > classes/global.properties.android
-
-/bin/mv classes/global.properties.android classes/global.properties
-
-cat classes/log4j.properties \
-  | sed "s@^gsdl3\.home=.*@gsdl3.home=$SDCARD_GSDL3HOME_ONDEVICE@" \
-  > classes/log4j.properties.android
-
-/bin/mv classes/log4j.properties.android classes/log4j.properties
-
-
-#---
-# Copy selected GS3 Jar files to I-Jetty jars
-#---
-
-echo "#---"
-if [ -d jars ] ; then
-  echo "# Regenerating jars"
-  /bin/rm -rf jars
-else
-  echo "# Generating jars"
-fi
-echo "#---"
-mkdir jars
-
-for f in $JARS ; do
-  echo "  Copying from Greenstone-3 to I-Jetty: $f"
-  /bin/cp "$GSDL3HOME/WEB-INF/lib/$f" jars/.
-done
-
-echo "Overriding existings Greenstone jars with ones that needed tweaking for Android"
-/bin/cp -v modified-jars/* jars/.
-
-
-echo "Topping up 'jars' with Android specific jars"
-/bin/cp -v extra-jars/* jars/.
-
-
-#---
-# Generate dex file in I-Jetty 'classes' directory
-#---
-
-
-# If need more memory, add
-# -JXmx1024M
-
-OUTPUT_DEX=$IJETTY_HOME/classes/classes.dex 
-INPUT_DIR=$IJETTY_HOME/jars
-
-dxcmd="dx"
-
-if [ "x$IJOS" = "xcygwin" ] ; then
-  OUTPUT_DEX=`cygpath -w $OUTPUT_DEX`
-  INPUT_DIR=`cygpath -w $INPUT_DIR`
-  dxcmd="dx.bat"
-elif [ "x$IJOS" = "xmingw" ] ; then
-  OUTPUT_DEX=`echo $OUTPUT_DEX | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
-  INPUT_DIR=`echo $INPUT_DIR | sed 's/^\/\(.\)/\1:/' | sed 's@/@\\\\@g'`
-  dxcmd="cmd /c dx.bat"
-fi
-
-# add --verbose for more information
-$dxcmd --verbose --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
-
-##dx.bat --dex --core-library --positions=lines --output=$OUTPUT_DEX $INPUT_DIR
-
-if [ $? != 0 ] ; then
-  echo "Error(s) encountered when running 'dx'"
-  exit 
-fi
-
-#---
-# Zip up I-Jetty classes directory and put it in lib
-#---
-
-echo "#---"
-if [ -d lib ] ; then
-  echo "# Regenerating directory: lib"
-  /bin/rm -rf lib
-else 
-  echo "# Generating directory: lib"
-fi
-echo "#---"
-mkdir lib
-
-echo "#---"
-echo "Zipping up I-Jetty 'classes' and storing in 'lib'"
-echo "#---"
-(cd classes && zip -r ../lib/classes.zip . && cd ..)
-
-if [ $? != 0 ] ; then
-  echo "Error(s) encountered zipping up dexified 'lib' files"
-  exit 
-fi
-
-
-
-echo "#---"
-echo "# Copying dexified 'lib' servlet code to "
-echo "#   $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib"
-echo "#---"
-echo ""
-
-if [ -d $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib ] ; then
-  /bin/rm -rf $PREPARE_SDCARD_GSDL3HOME/WEB-INF/lib 
-fi
-
-/bin/cp -r lib $PREPARE_SDCARD_GSDL3HOME/WEB-INF/.
-
-
-
-echo ""
-echo "####"
-echo "# Run ./IJETTY-PUSH.sh \"webapps\" to install all the files needed on the Andorid device"
-echo "# Run ./IJETTY-PUSH.sh \"webapps/WEB-INF/lib\" to install the latest DEX files on the device"
-echo "####"
-echo ""
