Merge pull request #417 from FranklinChen/installation-scripts

Improve Mac, Linux installation scripts. Still assumes using build.sh.
This commit is contained in:
Andrew Gibiansky 2015-03-07 10:32:45 -08:00
commit b351116a05
2 changed files with 51 additions and 12 deletions

View File

@ -1,16 +1,42 @@
#!/bin/sh
# Installation for Linux (tested on Ubuntu 14.10)
# Installation for Linux (tested on Ubuntu 14.10) from IHaskell repo directory.
# TODO Split out setup for installation from Hackage released versions.
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo pip install -U 'ipython[all]'
ghc --version >& /dev/null
if [ $? ]; then
true
else
echo "Please install ghc."
fi
sudo apt-get install libtinfo-dev
sudo apt-get install libzmq3-dev
cabal --version >& /dev/null
if [ $? ]; then
true
else
echo "Please install Cabal."
fi
sudo apt-get install libcairo2-dev
sudo apt-get install libpango1.0-dev
# Install IPython.
# python-pip is out of date, causes problems, so we get the latest version
# using easy_install instead.
#sudo apt-get install python-pip
sudo apt-get install -y python-dev
easy_install -U pip
pip install -U 'ipython[all]'
# Make sure to have basic tools installed.
cabal update
cabal install happy alex
cabal install cpphs
cabal install gtk2hs-buildtools
# C libraries
sudo apt-get install -y libtinfo-dev
sudo apt-get install -y libzmq3-dev
sudo apt-get install -y libcairo2-dev
sudo apt-get install -y libpango1.0-dev
./build.sh all
./build.sh display

View File

@ -1,6 +1,7 @@
#!/bin/sh
# Installation for Mac OS X.
# Installation for Mac OS X from IHaskell repo directory.
# TODO Split out setup for installation from Hackage released versions.
#
# This script assumes use of Homebrew.
# It is assumed you already have GHC and Cabal installed through Homebrew
@ -19,6 +20,19 @@ else
exit 1
fi
brew update
# Install IPython.
pip --version >& /dev/null
if [ $? ]; then
pip install -U 'ipython[all]'
else
echo "Python pip needs to be installed."
echo " One way is to install Homebrew Python:"
echo " $ brew install python"
exit 1
fi
if [ -n "`brew --config | grep '^CLT:.*N/A'`" ]; then
echo "You need to have XCode command line tools installed."
echo " $ xcode-select --install"
@ -36,7 +50,7 @@ cabal --version >& /dev/null
if [ $? ]; then
true
else
echo "Please install ghc."
echo "Please install Cabal."
echo " $ brew install cabal-install"
fi
@ -62,4 +76,3 @@ brew install pango
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
./build.sh all
./build.sh display