Mercurial > repos > vipints > rdiff
comparison rDiff/bin/start_interpreter.sh @ 0:0f80a5141704
version 0.3 uploaded
author | vipints |
---|---|
date | Thu, 14 Feb 2013 23:38:36 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0f80a5141704 |
---|---|
1 #/bin/bash | |
2 set -e | |
3 | |
4 . `dirname $0`/rdiff_config.sh | |
5 | |
6 export MATLAB_RETURN_FILE=`mktemp -t rDiff.XXXXXXXXXX.tmp` | |
7 | |
8 | |
9 if [ "$RDIFF_INTERPRETER" == 'octave' ]; | |
10 then | |
11 echo exit | ${RDIFF_OCTAVE_BIN_PATH} --no-window-system -q --eval "global SHELL_INTERPRETER_INVOKE; SHELL_INTERPRETER_INVOKE=1; warning('off', 'Octave:shadowed-function'); warning('off', 'Octave:deprecated-function') ; addpath $RDIFF_SRC_PATH; $1('$2'); exit;" || (echo starting Octave failed; rm -f $MATLAB_RETURN_FILE; exit -1) ; | |
12 fi | |
13 | |
14 if [ "$RDIFF_INTERPRETER" == 'matlab' ]; | |
15 then | |
16 echo exit | ${RDIFF_MATLAB_BIN_PATH} -nodisplay -r "global SHELL_INTERPRETER_INVOKE; SHELL_INTERPRETER_INVOKE=1; addpath $RDIFF_SRC_PATH; $1('$2'); exit;" || (echo starting Matlab failed; rm -f $MATLAB_RETURN_FILE; exit -1) ; | |
17 fi | |
18 | |
19 test -f $MATLAB_RETURN_FILE || exit 0 | |
20 ret=`cat $MATLAB_RETURN_FILE` ; | |
21 rm -f $MATLAB_RETURN_FILE | |
22 exit $ret | |
23 | |
24 |