source:
trunk/install_osx.sh
| Last change on this file was 2817, checked in by , 12 years ago | |
|---|---|
|
|
| File size: 1.1 KB | |
| Rev | Line | |
|---|---|---|
| [2655] | 1 | #!/bin/sh |
| 2 | ||
| [2817] | 3 | MPLTMP=/tmp/mpltmp |
| [2655] | 4 | FTPURL="ftp://ftp.atnf.csiro.au/pub/software/asap" |
| 5 | ||
| [2817] | 6 | trap 'rm -rf /tmp/mpltmp' EXIT |
| 7 | ||
| [2661] | 8 | #test -n $1 && export http_proxy=$1 |
| 9 | ||
| [2655] | 10 | if [ `id -u` -ne 0 ]; then |
| [2661] | 11 | echo "$0: Must be executed by root (sudo)" |
| [2655] | 12 | exit 1 |
| 13 | fi | |
| 14 | ASAPVERS=4.1 | |
| 15 | OSXVERS=$(sw_vers | grep -o '10\.[7-8]') | |
| [2656] | 16 | echo $OSXVERS |
| 17 | if [ -z ${OSXVERS} ]; then echo "Only OS X >= 10.7 supported"; exit 1; fi | |
| [2817] | 18 | if [ "$OSXVERS" == '10.8' ] |
| 19 | then | |
| 20 | ASAPEGG="${FTPURL}/${ASAPVERS}/asap-4.1.2-py2.7-macosx-${OSXVERS}-intel.egg" | |
| 21 | else | |
| 22 | ASAPEGG="${FTPURL}/${ASAPVERS}/asap-4.1.0-py2.7-macosx-${OSXVERS}-intel.egg" | |
| 23 | fi | |
| [2655] | 24 | MPLEGG="${FTPURL}/matplotlib/matplotlib-1.1.1-py2.7-macosx-${OSXVERS}-intel.egg" |
| 25 | MPL=$(/usr/bin/python -c 'import matplotlib' >/dev/null 2>&1) | |
| 26 | # install matplotlib if not already there | |
| 27 | if [ -n $? ] | |
| 28 | then | |
| 29 | echo "Matplotlib not installed. Installing from CASS ftp server..." | |
| [2656] | 30 | /usr/bin/easy_install-2.7 -U ${MPLEGG} |
| [2655] | 31 | fi |
| 32 | ||
| 33 | # This should pull in IPython if required | |
| [2656] | 34 | /usr/bin/easy_install-2.7 -U ${ASAPEGG} |
| [2655] | 35 | |
| 36 | # make sure readline is installed | |
| 37 | /usr/bin/easy_install-2.7 readline | |
| 38 | ||
| 39 | # update measures data | |
| [2656] | 40 | mkdir ${MPLTMP} |
| [2817] | 41 | MPLCONFIGDIR="${MPLTMP}" |
| 42 | /usr/local/bin/asap_update_data |
Note:
See TracBrowser
for help on using the repository browser.
