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