/
configure
executable file
·71 lines (58 loc) · 1.41 KB
/
configure
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
67
68
69
70
71
#!/bin/bash
###
### This script sets up your environment for building and executing Polyworld.
###
### Supported:
###
### Ubuntu 12.04
### Mint 13
###
### The current implementation only supports very specific versions of Linux. If
### you're using Mac, then you can't use this. If you're using a Debian-based
### distro/release not specifically supported by this script, there's a good
### chance that you can simply tweak this script to go down the Mint/Ubuntu path.
###
set -e
function err()
{
echo $@ >&2
exit 1
}
if [ `uname` != "Linux" ]; then
err "Only Linux supported by this script."
fi
###
### Determine distro and release
###
distro=$( lsb_release -is ) || err "Cannot determine distro via lsb_release"
release=$( lsb_release -rs ) || err "Cannot determine release via lsb_release"
if ([ "$distro" == "LinuxMint" ] && [ "$release" == "13" ]) || \
([ "$distro" == "Ubuntu" ] && [ "$release" == "12.04" ])
then
###
### Install Polyworld Packages
###
pw_packages="
g++
scons
libgsl0-dev
libqt4-opengl-dev
zlib1g-dev
python2.7-dev
python-scipy
"
apt-get install $pw_packages
###
### Install Farm Packages
###
farm_packages="
openssh-server
screen
subversion
"
apt-get install $farm_packages
else
err "Don't know how to configure '$distro' '$release'"
fi
echo
echo "configure complete"