more robust handling of invocation errors;
authorwenzelm
Fri, 28 Feb 1997 16:55:35 +0100
changeset 2703 5ce1310560ff
parent 2702 4167688e58aa
child 2704 afa01c9f1ab0
more robust handling of invocation errors;
bin/isatool
--- a/bin/isatool	Fri Feb 28 16:54:32 1997 +0100
+++ b/bin/isatool	Fri Feb 28 16:55:35 1997 +0100
@@ -7,14 +7,27 @@
 
 ## settings
 
+PRG=$(basename $0)
+
 ISABELLE_HOME=$(dirname $(dirname $0))
-. $ISABELLE_HOME/lib/scripts/getsettings || exit 2
+case "$ISABELLE_HOME" in
+  /*)
+    if [ -f $ISABELLE_HOME/lib/scripts/getsettings ]; then
+      . $ISABELLE_HOME/lib/scripts/getsettings || exit 2
+    else
+      echo "ERROR: $PRG probably not called from its original place!"
+      exit 1
+    fi
+    ;;
+  *)
+    echo "ERROR: $PRG not called with absolute path specification!"
+    exit 1
+    ;;
+esac
 
 
 ## diagnostics
 
-PRG=$(basename $0)
-
 function usage()
 {
   echo