0
|
1 #/bin/bash
|
|
2 # Copyright (C) 2010-2012 Max Planck Society
|
|
3
|
|
4 set -e
|
|
5
|
|
6 . `dirname $0`/deseq_config.sh
|
|
7
|
|
8 export MATLAB_RETURN_FILE=`tempfile`
|
|
9
|
|
10 if [ "$INTERPRETER" == 'octave' ];
|
|
11 then
|
|
12 echo exit | ${OCTAVE_BIN_PATH} --eval "global SHELL_INTERPRETER_INVOKE; SHELL_INTERPRETER_INVOKE=1; addpath $DESEQ_SRC_PATH; deseq_config; $1($2); exit;" || (echo starting Octave failed; rm -f $MATLAB_RETURN_FILE; exit -1) ;
|
|
13 fi
|
|
14
|
|
15 if [ "$INTERPRETER" == 'matlab' ];
|
|
16 then
|
|
17 echo exit | ${MATLAB_BIN_PATH} -nodisplay -r "global SHELL_INTERPRETER_INVOKE; SHELL_INTERPRETER_INVOKE=1; addpath $DESEQ_SRC_PATH; deseq_config; $1($2); exit;" || (echo starting Matlab failed; rm -f $MATLAB_RETURN_FILE; exit -1) ;
|
|
18 fi
|
|
19
|
|
20 test -f $MATLAB_RETURN_FILE || exit 0
|
|
21 ret=`cat $MATLAB_RETURN_FILE` ;
|
|
22 rm -f $MATLAB_RETURN_FILE
|
|
23 exit $ret
|
|
24
|