5 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
7 # check to see if $1 is set and is not start of other cli set args
9 if [ -n "$ARG1" -a "$ARG1" = "${ARG1#-}" -a \! "$ARG1" = "open" ]; then
10 # first argument exists and does not start with a "-" and is not "open"
15 JAVA="${APPDIR}/jre/bin/java"
16 GETDOWNTXT="${APPDIR}/getdown.txt"
17 if [ -e "$GETDOWNTXT" ]; then
19 for x in $(grep -e 'code = ' "${GETDOWNTXT}" | sed -e 's/^code\s*=\s*//;'); do
20 [ -n "$CLASSPATH" ] && CLASSPATH="${CLASSPATH}:"
21 CLASSPATH="${CLASSPATH}${APPDIR}/${x}"
24 echo "Cannot find getdown.txt" >&2
28 "$JAVA" -cp "$CLASSPATH" jalview.bin.Launcher $OPEN "$@"