root/other-projects/expeditee-release-kits/scripts/run.sh @ 29389

Revision 28740, 1.7 KB (checked in by ak19, 6 years ago)

Expeditee team (jts21). Add shared/windows folder with self-extracting Java 8 JRE, moved windows_wrapper.cpp to shared/windows/wrapper/wrapper.cpp, fixed run/findjava scripts

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3# Need to run this script from its own directory instead of whichever directory it may be called from
4#currentdir=$(cd `dirname "$0"` && pwd)
5thisdir="`dirname \"$0\"`"
6thisdir="`cd \"$thisdir\" && pwd`"
7cd "$thisdir"
8EXPEDITEE_HOME=$thisdir
9export EXPEDITEE_HOME
10
11if test "x$EXPEDITEE_OS" = "x" ; then
12    EXPEDITEE_OS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13    # check for running bash under cygwin
14    if test "`echo $EXPEDITEE_OS | sed 's/cygwin//'`" != "$EXPEDITEE_OS" ;
15    then
16    EXPEDITEE_OS=windows
17    fi
18fi
19export EXPEDITEE_OS
20
21
22if [ -z "$exp_lang" ]; then
23    exp_lang=en
24fi
25
26PROGNAME="Expeditee"
27PROGFULLNAME=$PROGNAME
28
29
30##  ---- Determine JAVA_HOME ----
31# JRE_HOME or JAVA_HOME must be set correctly to run this program
32#CLASSPATH
33# if setting classpath, see gs2-server.sh, then export it
34
35## ---- Check Java ----
36# call the script with source, so that we have the variables it sets ($javapath)
37exit_status=0
38source bin/findjava.sh "$exp_lang" "$PROGNAME"
39exit_status=$?
40if [ "$exit_status" -eq 1 ]; then
41    exit 1;
42fi
43export PATH=$javahome/bin:$PATH
44
45# -Xdock:name      To set the name of the app in the MacOS Dock bar
46# -Xdock:icon      Path to the MacOS Doc icon (not necessary for GS)   
47custom_vm_args=""
48if [ "$EXPEDITEE_OS" = "darwin" ]; then
49    custom_vm_args="-Xdock:name=$PROGFULLNAME"
50fi
51
52#-Xmx128M -classpath <classpath>...
53
54"$javapath" $custom_vm_args -jar Expeditee.jar $*
55
56# silent mode: when launched in the background (with & at end), need to
57# redirect any STDERR (STDOUT) output to /dev/null first, else output will hog the x-term.
58#"$javapath" $custom_vm_args org.greenstone.server.Server2 "$GSDLHOME" "$GSDLOS$GSDLARCH" "$serverlang" $* > /dev/null &
Note: See TracBrowser for help on using the browser.