annotate rDiff/bin/start_interpreter.sh @ 3:29a698dc5c7e default tip

Merge multiple heads.
author Dave Bouvier <dave@bx.psu.edu>
date Mon, 27 Jan 2014 14:15:36 -0500
parents 0f80a5141704
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
1 #/bin/bash
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
2 set -e
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
3
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
4 . `dirname $0`/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
5
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
6 export MATLAB_RETURN_FILE=`mktemp -t rDiff.XXXXXXXXXX.tmp`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
7
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
8
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
9 if [ "$RDIFF_INTERPRETER" == 'octave' ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
10 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
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) ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
12 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
13
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
14 if [ "$RDIFF_INTERPRETER" == 'matlab' ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
15 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
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) ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
17 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
18
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
19 test -f $MATLAB_RETURN_FILE || exit 0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
20 ret=`cat $MATLAB_RETURN_FILE` ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
21 rm -f $MATLAB_RETURN_FILE
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
22 exit $ret
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
23
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
24