Changeset 14884


Ignore:
Timestamp:
05/04/13 07:58:54 (12 years ago)
Author:
Mathieu Morlighem
Message:

NEW: install.sh now explains what to do instead of creating a symbolic link that does not work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/matlab/install.sh

    r14574 r14884  
    22set -eu
    33
    4 #Erase symlink
    5 rm -rf install
     4if [ ! -h install ];
     5then
     6        echo "  ****************************************************************"
     7        echo "  *                                                              *"
     8        echo "  * you need create a symbolic link from matlab's root directory *"
     9        echo "  *                                                              *"
     10        echo "  * First, you need to locate matlab's root directory            *"
     11        echo "  * The easiest way to find it is to launch matlab and run the   *"
     12        echo "  * following command: matlabroot                                *"
     13        echo "  * Then, create a symbolic link using the command 'ln -s ' the  *"
     14        echo "  * target directory should be named 'install'                   *"
     15        echo "  *                                                              *"
     16        echo "  * Examples:                                                    *"
     17        echo "  *    ln -s /usr/local/matlab712/ install                       *"
     18        echo "  *    ln -s /Applications/MATLAB_R2012a.app/ install            *"
     19        echo "  *                                                              *"
     20        echo "  * run ./install.sh again to check that the link is correct     *"
     21        echo "  *                                                              *"
     22        echo "  ****************************************************************"
     23else
    624
    7 #Select or create a new simlink
    8 #ln -s /usr/local/pkgs/matlab-7.6/ install
    9 #ln -s /discover/vis/mathworks/matlab_r2011b/ install
    10 #ln -s /usr/local/matlab704/ install
    11 #ln -s /usr/local/matlab711/ install
    12 ln -s /usr/local/matlab712/ install
    13 
    14 # Macintosh (OSX) simlink
    15 #ln -s /Applications/MATLAB_R2008a/ install
    16 #ln -s /Applications/MATLAB_R2009a.app/ install
    17 #ln -s /Applications/MATLAB_R2010a.app/ install
    18 #ln -s /Applications/MATLAB_R2012a.app/ install
    19 #ln -s /Applications/MATLAB_R2011a.app/ install
    20 #ln -s /Applications/MATLAB*.app/ install
     25        #Read link
     26        DIR=$(readlink install)
     27        if [ -d $DIR ]
     28        then
     29                echo "Symbolic link correctly set"
     30        else
     31                rm -rf install
     32                echo "Incorrect symbolic link:"
     33                echo "provided target ($DIR) does not exist or is not a directory"
     34        fi
     35fi
Note: See TracChangeset for help on using the changeset viewer.