-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·67 lines (45 loc) · 1.34 KB
/
install.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
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Install needed developer libraries
sudo apt-get install libgmp-dev zlib1g-dev libgl1-mesa-dev libglc-dev freeglut3-dev libedit-dev libglw1-mesa-dev libglw1-mesa
# Remove old tmp folder
sudo rm -r tmp
mkdir tmp
# Create symlink if necessary
libgmp=/usr/lib/libgmp.so.3
if [ ! \( -e "$libgmp" \) ]
then
sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5 $libgmp
fi
# Download the ghc
output_ghc_archive="tmp/ghc-7.6.3.tar.bz2"
output_ghc="tmp/ghc-7.6.3"
url=http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-unknown-linux.tar.bz2
wget $url -O $output_ghc_archive
# Unpack and remove archive
tar -xjvf $output_ghc_archive -C "tmp/"
rm $output_ghc_archive
# Configure and install
cd $output_ghc
./configure
sudo make install
# Remove ghc installation files
cd ../..
sudo rm -r $output_ghc
# Download the haskell platform
output_hp_archive="tmp/haskell-platform-2013.2.0.0.tar.gz"
output_hp="tmp/haskell-platform-2013.2.0.0"
url2=http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
wget $url2 -O $output_hp_archive
# Unpack and remove archive
tar -xzf $output_hp_archive -C "tmp/"
rm $output_hp_archive
# Configure and install
cd $output_hp
./configure
make
sudo make install
# Remove haskell platform installation files
cd ../..
sudo rm -r $output_hp
# Remove this tmp folder
sudo rm -r tmp