Mercurial > hg > dtl-dml-home
comparison etc/as_root.d/init_matlab.sh @ 30:2c279c979bcd
Pulled out MATLAB initialisation into a separate script.
author | samer |
---|---|
date | Mon, 16 Feb 2015 22:03:22 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
29:8576194f1c9c | 30:2c279c979bcd |
---|---|
1 | |
2 echo "Checking for MATLAB..." 1>&2 | |
3 MATLAB_ROOT=$(matlab -e | grep '^MATLAB=' | sed -e 's/MATLAB=//') | |
4 echo "MATLAB installed in $MATLAB_ROOT" 1>&2 | |
5 $DO apt-get install csh libtritonus-java libvorbisspi-java libmp3spi-java | |
6 $DO ln -sf /lib/x86_64-linux-gnu/libc.so.6 /lib64 | |
7 $DO ln -sf $MATLAB_ROOT/bin/matlab /usr/local/bin | |
8 | |
9 # MATLAB (R2012a at least) looks for Java extension jars in this directory | |
10 $DO mkdir -p /usr/java/packages/lib/ext | |
11 # NB - there may be some duplication of service providers here - I'm not sure | |
12 # which of them works best. | |
13 $DO ln -sf /usr/shara/java/{vorbisspi,mp3spi}.jar /usr/java/packages/lib/ext | |
14 $DO ln -sf /usr/shara/java/tritonus_{aos,core,jorbis,mp3,remaining,share}.jar /usr/java/packages/lib/ext | |
15 | |
16 # need to add native library paths to this file | |
17 if grep '/usr/lib/jni' $MATLAB_ROOT/toolbox/local/librarypath.txt; then | |
18 echo "MATLAB Library path already set." 1>&2 | |
19 else | |
20 if [ $DRY_RUN == yes ]; then | |
21 echo "echo '/usr/lib/jni' >> $MATLAB_ROOT/toolbox/local/librarypath.txt" | |
22 else | |
23 echo '/usr/lib/jni' >> $MATLAB_ROOT/toolbox/local/librarypath.txt | |
24 fi | |
25 fi | |
26 if [ -h $MATLAB_ROOT/bin/lcdata.xml ]; then | |
27 echo "MATLAB character set already set up" 1>&2 | |
28 else | |
29 echo "Adjusting MATLAB character set" 1>&2 | |
30 mv $MATLAB_ROOT/bin/lcdata.xml $MATLAB_ROOT/bin/lcdata_orig.xml | |
31 ln -s lcdata_utf8.xml $MATLAB_ROOT/bin/lcdata.xml | |
32 fi |