diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-09-24 17:05:02 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-09-24 17:05:02 +0200 |
commit | 518f51ee918d6b44a9bca755cc49db0ead083108 (patch) | |
tree | 8029bf0eb8ffa2e6f93ea0acd1c2d5a11a951b26 /m/runmath.sh | |
parent | 0e9103e1d2393af2d51c49645569767d1e8544c7 (diff) |
Use kranc script instead of calling Mathematica directly
This allows use of better error handling provided by Kranc
Diffstat (limited to 'm/runmath.sh')
-rwxr-xr-x | m/runmath.sh | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/m/runmath.sh b/m/runmath.sh index 306b2e1..18196d1 100755 --- a/m/runmath.sh +++ b/m/runmath.sh @@ -3,8 +3,6 @@ # Abort on errors set -e -MATHEMATICA="math" - script=$1 if test -z "$script"; then @@ -18,17 +16,8 @@ output=$(basename $script .m).out rm -f $output -# Run Mathematica to regenerate the code -< $script "$MATHEMATICA" | tee $error - -if grep 'KrancError' $error; then - echo - echo "There was an error when running Kranc on $script." - echo "The file $error contains details." - echo - echo "*** The Cactus thorns have NOT been updated. ***" - echo - exit 1 -fi +# Run Kranc to regenerate the code +../../../repos/Kranc/Bin/kranc $script | tee $error +[ $PIPESTATUS -eq 0 ] || exit $PIPESTATUS mv $error $output |