1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 18:18:51 +03:00
mal/matlab/run
Dov Murik 27a8252525 matlab: Add 'run' script to handle command-line args
The 'run' wrapper script escapes and creates the proper matlab/octave
command-line, replacing definitions from the main Makefile.
2016-05-14 23:55:30 -04:00

14 lines
351 B
Bash
Executable File

#!/bin/bash
args=""
if [ "$#" -gt 0 ]; then
args="'$1'"
for a in "${@:2}"; do
args="$args,'$a'"
done
fi
if [ -n "$USE_MATLAB" ] ; then
exec matlab -nodisplay -nosplash -nodesktop -nojvm -r "${STEP:-stepA_mal}($args);quit;"
else
exec octave --no-gui --no-history -q --traditional --eval "${STEP:-stepA_mal}($args);quit;"
fi