lib/Tools/jedit
author wenzelm
Thu, 04 Jun 2009 17:31:38 +0200
changeset 31427 5a07cc86675d
parent 29143 72c960b2b83e
permissions -rwxr-xr-x
reraise exceptions to preserve original position (ML system specific);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28649
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     2
#
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     3
# Author: Makarius
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     4
#
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     5
# DESCRIPTION: Isabelle/jEdit interface wrapper
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     6
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     7
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     8
## diagnostics
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
     9
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    10
function fail()
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    11
{
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    12
  echo "$1" >&2
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    13
  exit 2
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    14
}
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    15
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    16
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    17
## main
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    18
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    19
[ -z "$JEDIT_HOME" ] && fail "Missing Isabelle/jEdit installation (JEDIT_HOME)"
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    20
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    21
INTERFACE="$JEDIT_HOME/interface"
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    22
[ ! -x "$INTERFACE" ] && fail "Bad interface script: \"$INTERFACE\""
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    23
58ab885469f5 Isabelle/jEdit interface wrapper.
wenzelm
parents:
diff changeset
    24
exec "$INTERFACE" "$@"