aboutsummaryrefslogtreecommitdiff
path: root/isar/interface
diff options
context:
space:
mode:
Diffstat (limited to 'isar/interface')
-rw-r--r--isar/interface33
1 files changed, 19 insertions, 14 deletions
diff --git a/isar/interface b/isar/interface
index 3c7c4282..ca591b24 100644
--- a/isar/interface
+++ b/isar/interface
@@ -1,14 +1,14 @@
-#!/bin/sh
+#!/usr/bin/env bash
#
# $Id$
#
# Proof General interface wrapper for Isabelle.
-
+set -x
## self references
-THIS=`cd \`dirname "$0"\`; pwd`
-SUPER=`cd "$THIS/.."; pwd`
-KIND=`basename \`dirname "$0"\``
+THIS=$(cd "$(dirname "$0")"; pwd)
+SUPER=$(cd "$THIS/.."; pwd)
+KIND=$(basename "$(dirname "$0")")
if [ "$KIND" = isar ]; then
ISAR=true
@@ -95,8 +95,8 @@ getoptions()
getoptions $PROOFGENERAL_OPTIONS
-getoptions $*
-shift `expr $OPTIND - 1`
+getoptions "$@"
+shift $(($OPTIND - 1))
if [ "$ISAR" = true ]; then
KIND=isar
@@ -109,10 +109,15 @@ fi
# args
-FILES="$@"
-shift "$#"
-
-[ -z "$FILES" ] && FILES="$DEFAULT_FILES"
+if [ "$#" -eq 0 ]; then
+ FILES="$DEFAULT_FILES"
+else
+ FILES=""
+ while [ "$#" -gt 0 ]; do
+ FILES="$FILES '$1'"
+ shift
+ done
+fi
## main
@@ -132,12 +137,12 @@ fi
[ ! "$XSYMBOLSETUP" = true ] && XSYMBOL_HOME=""
-ARGS="$ARGS -l $SUPER/isa/interface-setup.el"
+ARGS="$ARGS -l '$SUPER/isa/interface-setup.el'"
for FILE in "$ISABELLE_HOME/etc/proofgeneral-settings.el" \
"$ISABELLE_HOME_USER/etc/proofgeneral-settings.el"
do
- [ -f "$FILE" ] && ARGS="$ARGS -l $FILE"
+ [ -f "$FILE" ] && ARGS="$ARGS -l '$FILE'"
done
PROOFGENERAL_HOME="$SUPER"
@@ -147,4 +152,4 @@ PROOFGENERAL_XSYMBOL="$XSYMBOL"
export PROOFGENERAL_HOME PROOFGENERAL_ASSISTANTS PROOFGENERAL_LOGIC PROOFGENERAL_XSYMBOL
-exec $PROGNAME $ARGS $FILES
+eval exec "$PROGNAME" "$ARGS" "$FILES"