diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-12-29 20:29:48 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-10-29 11:36:48 +0100 |
commit | fa56b7f58ef3c4824977d253d89bba2bea1593c7 (patch) | |
tree | f22b7baac7d32a688bf112633734e77f246a1084 | |
parent | 18fe14998dac0391740f14a2bc5a8a2f014eb36b (diff) |
runmath: configurable path to kranc via KRANC_PATH env var
-rwxr-xr-x | m/runmath.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/m/runmath.sh b/m/runmath.sh index 18196d1..6943950 100755 --- a/m/runmath.sh +++ b/m/runmath.sh @@ -11,13 +11,18 @@ if test -z "$script"; then exit 2 fi +if [ -z "${KRANC_PATH}" ]; then + echo "Path to Kranc not set. Set the KRANC_PATH env var." + exit 3 +fi + error=$(basename $script .m).err output=$(basename $script .m).out rm -f $output # Run Kranc to regenerate the code -../../../repos/Kranc/Bin/kranc $script | tee $error +${KRANC_PATH} $script | tee $error [ $PIPESTATUS -eq 0 ] || exit $PIPESTATUS mv $error $output |