source: trunk/install_osx.sh@ 2874

Last change on this file since 2874 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
RevLine 
[2655]1#!/bin/sh
2
[2817]3MPLTMP=/tmp/mpltmp
[2655]4FTPURL="ftp://ftp.atnf.csiro.au/pub/software/asap"
5
[2817]6trap 'rm -rf /tmp/mpltmp' EXIT
7
[2661]8#test -n $1 && export http_proxy=$1
9
[2655]10if [ `id -u` -ne 0 ]; then
[2661]11 echo "$0: Must be executed by root (sudo)"
[2655]12 exit 1
13fi
14ASAPVERS=4.1
15OSXVERS=$(sw_vers | grep -o '10\.[7-8]')
[2656]16echo $OSXVERS
17if [ -z ${OSXVERS} ]; then echo "Only OS X >= 10.7 supported"; exit 1; fi
[2817]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
[2655]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..."
[2656]30 /usr/bin/easy_install-2.7 -U ${MPLEGG}
[2655]31fi
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]40mkdir ${MPLTMP}
[2817]41MPLCONFIGDIR="${MPLTMP}"
42/usr/local/bin/asap_update_data
Note: See TracBrowser for help on using the repository browser.