blob: 3c7615b9ea6ad3463ce4caca764adf6284fc832d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#! /bin/bash
# Abort on errors
set -e
script=$1
if test -z "$script"; then
echo "Usage:"
echo "$0 <script.m>"
exit 2
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
[ $PIPESTATUS -eq 0 ] || exit $PIPESTATUS
mv $error $output
|