Changeset 23931 for gs3-extensions


Ignore:
Timestamp:
2011-04-19T00:02:57+12:00 (13 years ago)
Author:
davidb
Message:

Some fine-tuning of scripts, as the result of a fresh pass at setting up Greenstone-3 on an Android device

Location:
gs3-extensions/i-jetty/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/i-jetty/trunk/src/DEX-TO-SDCARD.sh

    r23920 r23931  
    55  echo "  => No valid directory to install to on Android device"
    66  echo "  => Did you run setup.bash before the Android device was in disk mode?"
    7   exit
     7  echo "  => Alternatively, set the environment variable explicitly"
     8  exit -1
    89fi
    910
  • gs3-extensions/i-jetty/trunk/src/JAVA-TO-DEX.sh

    r23930 r23931  
    55  echo "  => No valid directory to install to on Android device"
    66  echo "  => Did you run setup.bash before the Android device was in disk mode?"
    7   exit
     7  echo "  => Alternatively, set the environment variable explicitly"
     8  exit -1
    89fi
    910
  • gs3-extensions/i-jetty/trunk/src/WEBAPP-ROOT-TO-SDCARD.sh

    r23888 r23931  
    11#!/bin/bash
     2
     3if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
     4  echo "Environment variable SDCARD_WEBAPPS undefined"
     5  echo "  => No valid directory to install to on Android device"
     6  echo "  => Did you run setup.bash before the Android device was in disk mode?"
     7  echo "  => Alternatively, set the environment variable explicitly"
     8  exit -1
     9fi
     10
    211
    312if [ ! -d $SDCARD_GSDL3HOME ] ; then
     
    1221echo "#---"
    1322echo "# $mode $GSDL3HOME -> $SDCARD_GSDL3HOME"
     23echo "# (this may take several minutes)"
     24echo "#---"
     25echo ""
     26
    1427if [ $mode = "Installing" ] ; then
    15   echo "# (this may take several minutes)"
    16   echo "#---"
    17   echo ""
    1828  (cd $GSDL3HOME && find . -type d ) \
    1929    | egrep -v '/\.svn' \
     
    2232    | egrep -v 'WEB-INF/lib' \
    2333    | xargs -I {} mkdir -p $SDCARD_GSDL3HOME/{}
    24 else
    25   echo "#---"
    26   echo ""
    2734fi
    28 
    2935
    3036(cd $GSDL3HOME && find . -type f ) \
     
    3945  echo "Creating 'localsite' in $SDCARD_GSDLHOME"
    4046  mkdir $SDCARD_GSDL3HOME/sites/localsite
     47  mkdir $SDCARD_GSDL3HOME/sites/localsite/collect
    4148fi
    4249
    43 /bin/cp -u -v -r sites/without-jni/* $SDCARD_GSDL3HOME/sites/localsite/.
     50/bin/cp -u -v $GSDL3HOME/sites/localsite/siteConfig.xml $SDCARD_GSDL3HOME/sites/localsite/.
     51
     52/bin/cp -u -v -r $GSDL3HOME/sites/localsite/etc $SDCARD_GSDL3HOME/sites/localsite/.
     53
     54/bin/cp -u -v -r $GSDL3HOME/sites/localsite/collect/lucene-jdbm-demo $SDCARD_GSDL3HOME/sites/localsite/collect/.
    4455
    4556
    4657
     58
     59
  • gs3-extensions/i-jetty/trunk/src/setup.bash

    r23925 r23931  
    1818
    1919if [ "x$GSDL3HOME" = "x" ] ; then
    20   echo "Setting GSDL3HOME to '../../web'"
     20  echo "  Setting GSDL3HOME to '../../web'"
    2121  export GSDL3HOME=../../web
    2222else
     
    2626if [ "x$SDCARD_WEBAPPS" = "x" ] ; then
    2727
     28  possible_drives=""
    2829  if [ "x$IJOS" = "xcygwin" ] ; then
    2930
    3031    possible_drives=`ls -d /cygdrive/*/jetty/webapps 2>/dev/null`
    31     num_possible_drives=`echo $possible_drives | wc -l`
     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
    3238
    33     if [ $num_possible_drives = "0" ] ; then
     39  num_possible_drives=`echo $possible_drives | wc -l`
     40
     41  if [ $num_possible_drives = "0" ] ; then
    3442      echo "    Failed to automatically find and sdcard webapps folders"
    3543      echo "    Explicitly set the environment variable SDCARD_WEBAPPS to control"
    3644      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
     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"   
    4752  fi
    4853fi
     
    7277echo "+ Your environment has now been set up with iJetty extension for Greenstone"
    7378
     79echo ""
     80echo "If this is the first time you have installed Greenstone on the Android device, "
     81echo " run:"
     82echo "  ./WEBAPP-ROOT-TO-SDCARD.sh"
     83echo ""
     84echo "Then:"
     85echo ""
     86echo "  ./JAVA-TO-DEX.sh"
     87echo ""
    7488
     89
     90
     91
Note: See TracChangeset for help on using the changeset viewer.