Index: /gs3-extensions/i-jetty/trunk/src/DEX-TO-SDCARD.sh
===================================================================
--- /gs3-extensions/i-jetty/trunk/src/DEX-TO-SDCARD.sh	(revision 23930)
+++ /gs3-extensions/i-jetty/trunk/src/DEX-TO-SDCARD.sh	(revision 23931)
@@ -5,5 +5,6 @@
   echo "  => No valid directory to install to on Android device"
   echo "  => Did you run setup.bash before the Android device was in disk mode?"
-  exit
+  echo "  => Alternatively, set the environment variable explicitly"
+  exit -1
 fi
 
Index: /gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh
===================================================================
--- /gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh	(revision 23930)
+++ /gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh	(revision 23931)
@@ -5,5 +5,6 @@
   echo "  => No valid directory to install to on Android device"
   echo "  => Did you run setup.bash before the Android device was in disk mode?"
-  exit
+  echo "  => Alternatively, set the environment variable explicitly"
+  exit -1
 fi
 
Index: /gs3-extensions/i-jetty/trunk/src/WEBAPP-ROOT-TO-SDCARD.sh
===================================================================
--- /gs3-extensions/i-jetty/trunk/src/WEBAPP-ROOT-TO-SDCARD.sh	(revision 23930)
+++ /gs3-extensions/i-jetty/trunk/src/WEBAPP-ROOT-TO-SDCARD.sh	(revision 23931)
@@ -1,3 +1,12 @@
 #!/bin/bash
+
+if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
+  echo "Environment variable SDCARD_WEBAPPS undefined"
+  echo "  => No valid directory to install to on Android device"
+  echo "  => Did you run setup.bash before the Android device was in disk mode?"
+  echo "  => Alternatively, set the environment variable explicitly"
+  exit -1
+fi
+
 
 if [ ! -d $SDCARD_GSDL3HOME ] ; then
@@ -12,8 +21,9 @@
 echo "#---"
 echo "# $mode $GSDL3HOME -> $SDCARD_GSDL3HOME"
+echo "# (this may take several minutes)"
+echo "#---"
+echo ""
+
 if [ $mode = "Installing" ] ; then
-  echo "# (this may take several minutes)"
-  echo "#---"
-  echo ""
   (cd $GSDL3HOME && find . -type d ) \
     | egrep -v '/\.svn' \
@@ -22,9 +32,5 @@
     | egrep -v 'WEB-INF/lib' \
     | xargs -I {} mkdir -p $SDCARD_GSDL3HOME/{}
-else 
-  echo "#---"
-  echo ""
 fi
-
 
 (cd $GSDL3HOME && find . -type f ) \
@@ -39,8 +45,15 @@
   echo "Creating 'localsite' in $SDCARD_GSDLHOME"
   mkdir $SDCARD_GSDL3HOME/sites/localsite
+  mkdir $SDCARD_GSDL3HOME/sites/localsite/collect
 fi
 
-/bin/cp -u -v -r sites/without-jni/* $SDCARD_GSDL3HOME/sites/localsite/.
+/bin/cp -u -v $GSDL3HOME/sites/localsite/siteConfig.xml $SDCARD_GSDL3HOME/sites/localsite/.
+
+/bin/cp -u -v -r $GSDL3HOME/sites/localsite/etc $SDCARD_GSDL3HOME/sites/localsite/.
+
+/bin/cp -u -v -r $GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo $SDCARD_GSDL3HOME/sites/localsite/collect/.
 
 
 
+
+
Index: /gs3-extensions/i-jetty/trunk/src/setup.bash
===================================================================
--- /gs3-extensions/i-jetty/trunk/src/setup.bash	(revision 23930)
+++ /gs3-extensions/i-jetty/trunk/src/setup.bash	(revision 23931)
@@ -18,5 +18,5 @@
 
 if [ "x$GSDL3HOME" = "x" ] ; then
-  echo "Setting GSDL3HOME to '../../web'"
+  echo "  Setting GSDL3HOME to '../../web'"
   export GSDL3HOME=../../web
 else 
@@ -26,23 +26,28 @@
 if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
 
+  possible_drives=""
   if [ "x$IJOS" = "xcygwin" ] ; then
 
     possible_drives=`ls -d /cygdrive/*/jetty/webapps 2>/dev/null`
-    num_possible_drives=`echo $possible_drives | wc -l`
+  elif [ "x$IJOS" = "xmingw" ] ; then
+    possible_drives=`ls -d /*/jetty/webapps 2>/dev/null`
+  else
+    # Linux and MacOS
+    possible_drives=`ls -d /mnt/*/jetty/webapps 2>/dev/null`
+  fi
 
-    if [ $num_possible_drives = "0" ] ; then
+  num_possible_drives=`echo $possible_drives | wc -l`
+
+  if [ $num_possible_drives = "0" ] ; then
       echo "    Failed to automatically find and sdcard webapps folders"
       echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
       echo "      installation on the Android phone"   
-    else 
-      if [ $num_possible_drives = "1" ] ; then
-        export SDCARD_WEBAPPS=${possible_drives[0]}
-      else
-        echo "    Detected more than one possible sdcard webapps folders:"
-        echo "      $possible_drives"
-        echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
-        echo "      which one is used for installation on the Android phone"   
-      fi
-    fi
+  elif [ $num_possible_drives = "1" ] ; then
+      export SDCARD_WEBAPPS=${possible_drives[0]}
+  else
+      echo "    Detected more than one possible sdcard webapps folders:"
+      echo "      $possible_drives"
+      echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
+      echo "      which one is used for installation on the Android phone"   
   fi
 fi
@@ -72,3 +77,15 @@
 echo "+ Your environment has now been set up with iJetty extension for Greenstone"
 
+echo ""
+echo "If this is the first time you have installed Greenstone on the Android device, "
+echo " run:"
+echo "  ./WEBAPP-ROOT-TO-SDCARD.sh"
+echo ""
+echo "Then:"
+echo ""
+echo "  ./JAVA-TO-DEX.sh"
+echo ""
 
+
+
+
