source: trunk/install_osx.sh@ 2897

Last change on this file since 2897 was 2817, checked in by Malte Marquarding, 11 years ago

update OSX install script to use latest version; tidy up tmp dir handling

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