aboutsummaryrefslogtreecommitdiff
path: root/Bin/kranc
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-10-28 18:56:40 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2011-10-28 18:56:49 +0200
commit8c8df5bf89c35e4117c4678b77a87fecc5266195 (patch)
tree37e7fa34bdd42467577272e68724204314331f07 /Bin/kranc
parent4afe01326f6d81ea681cebfd54570a5d13884678 (diff)
parent661fda00d65e80e192bc561c5d8e9eafd60e8e3f (diff)
Merge branch opencl into master
Diffstat (limited to 'Bin/kranc')
-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