aboutsummaryrefslogtreecommitdiff
path: root/Bin
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-10-06 19:48:28 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2011-10-06 22:15:33 +0200
commitad5d11b6f6ee7d69ce3947c265c9e1e429df739a (patch)
treee43218efafe1ae33212edbd50a061f48e65f4e26 /Bin
parent136b1945fcbcbefad04954690f5ac93d51fea42e (diff)
kranc: Add some error-checking and information to the launch script
Diffstat (limited to 'Bin')
-rwxr-xr-xBin/kranc15
1 files changed, 14 insertions, 1 deletions
diff --git a/Bin/kranc b/Bin/kranc
index 9f16432..e82e75a 100755
--- a/Bin/kranc
+++ b/Bin/kranc
@@ -1,9 +1,22 @@
#!/bin/bash
-# Assume that this script is called from the Kranc/Bin directory
+set -e
+
+# Assume that this script is called from the Kranc/Bin directory.
+# This will not work if someone creates a symlink to the kranc script
+# somewhere else
export KRANCDIR=$(dirname $0)/..
+
+if [ ! -r "$KRANCDIR/Tools/CodeGen" ]; then
+ echo "Cannot find Kranc (the kranc script must be run directly from the Kranc/Bin directory - symbolic links are not currently allowed)"
+ exit 1
+fi
+
export KRANCVERBOSE=no
+echo "Using Kranc installation at $KRANCDIR"
+# It would be good to find a portable way to canonicalise KRANCDIR.
+
while getopts "v" flag
do
case $flag in