From 4570a63853c137c64310832b7238e7a2221a9afe Mon Sep 17 00:00:00 2001 From: ianhin Date: Mon, 19 Jun 2006 22:30:11 +0000 Subject: A script for invoking Kranc on a .m file passed as an argument. Looks in the current directory for Kranc, which can be a symlink. --- Bin/kranc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 Bin/kranc (limited to 'Bin') diff --git a/Bin/kranc b/Bin/kranc new file mode 100755 index 0000000..9e39af0 --- /dev/null +++ b/Bin/kranc @@ -0,0 +1,32 @@ +#!/bin/bash + +# A shell script to run Kranc on a mathematica input file + +INFILE=$1 + +if ! which math >/dev/null +then + echo "Cannot find math executable. Is Mathematica on your path?" +fi + +LOCALKRANCPATH="Kranc/Tools/CodeGen:Kranc/Tools/MathematicaMisc:Kranc/Tools/External" + +if [ -z "$MATHPATH" ] +then + MATHPATH=$LOCALKRANCPATH +else + MATHPATH=$LOCALKRANCPATH:$MATHPATH +fi + +export MATHPATH + +math <{":"}]]; + \$Path = Join[newPath, \$Path]]; +Needs["Errors\`"]; +exception = Catch[Get["$INFILE"], KrancError]; +PrintError[exception]; +EOF -- cgit v1.2.3