forked from IHaskell/IHaskell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
root-deps.sh
executable file
·53 lines (40 loc) · 1.33 KB
/
root-deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Script for installing ihaskell dependencies. Specifically, this script
# installs dependencies using apt-get, and needs to be executed as root.
# Directly utilized for providing ihaskell to jupyter/docker-demo-images
if [ $(id -u) -ne 0 ]; then
echo "Please run as root"
exit 1
fi
if [ -z "$(which ghc)" ]; then
echo "Please install ghc."
exit 1
fi
if [ -z "$(which cabal)" ]; then
echo "Please install Cabal."
exit 1
fi
# If ipython is installed, and has a major version >= 3, then use the
# installed version. Otherwise we install from scratch.
if [ -n "$(which ipython)" ] && { [ $(ipython --version | cut -f 1 -d '.') -ge 3 ]; } then
echo "Using ipython already installed: $(which ipython)"
else
# 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
apt-get install -y python-dev
# To get easy_install
apt-get install -y python-setuptools
easy_install -U pip
# -H to use .cache in /root
pip install -U 'ipython[all]'
fi
# C libraries
apt-get install -y libtinfo-dev
apt-get install -y libzmq3-dev
apt-get install -y libcairo2-dev
apt-get install -y libpango1.0-dev
apt-get install -y libmagic-dev
apt-get install -y libblas-dev
apt-get install -y liblapack-dev