Commit 1e906f11 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Merge branch 'master' of github.com:gibiansky/IHaskell

parents c6100620 a2f8d771
#!/bin/sh #!/bin/sh
set -e
# Installation for Mac OS X from IHaskell repo directory. # Installation for Mac OS X from IHaskell repo directory.
# TODO Split out setup for installation from Hackage released versions. # TODO Split out setup for installation from Hackage released versions.
...@@ -11,48 +12,50 @@ ...@@ -11,48 +12,50 @@
# #
# XQuartz is needed for Cairo and Pango. # XQuartz is needed for Cairo and Pango.
brew --version >& /dev/null function abort() {
if [ $? ]; then for line
true do
else echo >&2 "$line"
echo "Homebrew needs to be installed." done
echo " Download from http://brew.sh/"
exit 1 exit 1
fi }
brew update brew --version >& /dev/null || abort \
"Homebrew needs to be installed." \
" Download from http://brew.sh/"
# Install IPython. # Install IPython.
pip --version >& /dev/null if command -v pip3 >/dev/null 2>&1
if [ $? ]; then then
pip install -U 'ipython[all]' PIP=pip3
elif command -v pip >/dev/null 2>&1
then
PIP=pip
else else
echo "Python pip needs to be installed." abort \
echo " One way is to install Homebrew Python:" "Python pip needs to be installed." \
echo " $ brew install python" " One way is to install Homebrew Python:" \
exit 1 " $ brew install python"
fi fi
if [ -n "`brew --config | grep '^CLT:.*N/A'`" ]; then $PIP --version >& /dev/null || abort \
echo "You need to have XCode command line tools installed." "Python $PIP needs to be installed." \
echo " $ xcode-select --install" " One way is to install Homebrew Python:" \
fi " $ brew install python"
ghc --version >& /dev/null $PIP install -U 'ipython[all]'
if [ $? ]; then
true
else
echo "Please install ghc."
echo " $ brew install ghc"
fi
cabal --version >& /dev/null [ -n "`brew --config | grep '^CLT:.*N/A'`" ] && abort \
if [ $? ]; then "You need to have XCode command line tools installed." \
true " $ xcode-select --install"
else
echo "Please install Cabal." ghc --version >& /dev/null || abort \
echo " $ brew install cabal-install" "Please install ghc." \
fi " $ brew install ghc"
cabal --version >& /dev/null || abort \
"Please install Cabal." \
" $ brew install cabal-install"
# Make sure to have basic tools installed. # Make sure to have basic tools installed.
cabal update cabal update
...@@ -61,15 +64,17 @@ cabal install cpphs ...@@ -61,15 +64,17 @@ cabal install cpphs
cabal install gtk2hs-buildtools cabal install gtk2hs-buildtools
# Homebrew stuff. # Homebrew stuff.
brew install zeromq brew update
brew install libmagic brew ls --versions zeromq | grep -q . || brew install zeromq
brew ls --versions libmagic | grep -q . || brew install libmagic
# XQuartz is required: http://xquartz.macosforge.org/landing/ # XQuartz is required: http://xquartz.macosforge.org/landing/
# The easiest way is through Homebrew. # The easiest way is through Homebrew.
brew install Caskroom/cask/xquartz brew tap caskroom/cask
brew ls --versions brew-cask | grep -q . || brew install brew-cask
brew install cairo brew cask ls --versions xquartz | grep -q . || brew cask install xquartz
brew install pango brew ls --versions cairo | grep -q . || brew install cairo
brew ls --versions pango | grep -q . || brew install pango
# make cabal install magic, which won't work correctly if done using # make cabal install magic, which won't work correctly if done using
# default flags, since Homebrew dumps libmagic into /usr/local/lib rather than /lib # default flags, since Homebrew dumps libmagic into /usr/local/lib rather than /lib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment