Admin/Linux/Isabelle
author wenzelm
Wed, 11 Sep 2013 21:40:03 +0200
changeset 53573 3cffcc303fc0
parent 53483 74a4685a96c8
child 53581 c0ad478abf50
permissions -rw-r--r--
cold-start of main application even on Linux;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53483
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     2
#
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     3
# Author: Makarius
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     4
#
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     5
# Main Isabelle application wrapper.
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     6
53573
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
     7
# dereference executable
53483
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     8
if [ -L "$0" ]; then
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
     9
  TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')"
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    10
  exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@"
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    11
fi
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    12
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    13
53573
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    14
# minimal Isabelle environment
53483
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    15
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    16
ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; pwd)"
53573
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    17
source "$ISABELLE_HOME/lib/scripts/isabelle-platform"
53483
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    18
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    19
53573
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    20
# main
53483
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    21
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    22
declare -a JAVA_ARGS
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    23
JAVA_ARGS=({JAVA_ARGS})
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    24
53573
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    25
exec "$ISABELLE_HOME/contrib/jdk/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/bin/java" \
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    26
  -classpath "$ISABELLE_HOME/lib/classes/ext/Pure.jar:$ISABELLE_HOME/lib/classes/ext/scala-compiler.jar:$ISABELLE_HOME/lib/classes/ext/scala-library.jar:$ISABELLE_HOME/lib/classes/ext/scala-swing.jar:$ISABELLE_HOME/lib/classes/ext/scala-actors.jar:$ISABELLE_HOME/lib/classes/ext/scala-reflect.jar:$ISABELLE_HOME/src/Tools/jEdit/dist/jedit.jar" \
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    27
  "${JAVA_ARGS[@]}" "-Disabelle.home=$ISABELLE_HOME" \
3cffcc303fc0 cold-start of main application even on Linux;
wenzelm
parents: 53483
diff changeset
    28
  isabelle.Main "$@"
53483
74a4685a96c8 generate application based on $JEDIT_JAVA_OPTIONS $JEDIT_SYSTEM_OPTIONS at build time (see also src/Tools/jEdit/lib/Tools/jedit);
wenzelm
parents:
diff changeset
    29