Skip to content
Newer
Older
100755 93 lines (78 sloc) 2.66 KB
101aa12 initial import
Justine Tunney authored
1 #!/bin/bash
2
3 if [[ $USER != "root" ]]; then
4 echo You need to be root to run me
5 exit 1
6 fi
7
8 if [[ ! -f /usr/bin/apt-get ]]; then
9 echo You need a debian/ubuntu linux distro
10 exit 1
11 fi
12
13 function doit {
14 echo $@
15 if ! $@; then
16 echo "COMMAND FAILED"
17 exit 1
18 fi
19 }
20
21 echo
22 echo '----------------------------------------------------------------------'
23 echo ' INSTALLING IMPORTANT DEPENDENCIES '
24 echo '----------------------------------------------------------------------'
25 echo
26
27 doit apt-get install --assume-yes \
28 build-essential \
3fc56d6 greek language support
Justine Tunney authored
29 python python-dev python-setuptools python-simplejson python-virtualenv \
75a337f add PIL (python-imaging) to dependencies file
Justine Tunney authored
30 python-imaging gettext
101aa12 initial import
Justine Tunney authored
31
32 echo
33 echo '----------------------------------------------------------------------'
34 echo ' INSTALLING GEOGRAPHY DATABASE STUFF '
35 echo '----------------------------------------------------------------------'
36 echo
37
e1461e0 revise readme and install script so more likely to work
Justine Tunney authored
38 if apt-cache search ^postgresql | grep ^postgresql-9.1 >/dev/null 2>&1; then
39 # tested on ubuntu 11.10
40 doit apt-get install --assume-yes \
41 postgresql postgresql-9.1-postgis postgresql-contrib \
42 libpq-dev python-psycopg2 gdal-bin proj libgeos-dev \
43 libgeoip-dev
44 else
45 # tested on debian 6, ubuntu 10.04, and ubuntu 10.10
46 doit apt-get install --assume-yes \
47 postgresql-8.4-postgis postgresql-contrib postgresql-contrib-8.4 \
48 libpq-dev python-psycopg2 \
49 gdal-bin proj libgeos-dev \
50 libgeoip-dev
51 fi
101aa12 initial import
Justine Tunney authored
52
53 echo
54 echo '----------------------------------------------------------------------'
ec81210 trying to make this goofy chat thing
Justine Tunney authored
55 echo ' INSTALLING STUFF PROBABLY NEEDED FOR CHAT THING '
101aa12 initial import
Justine Tunney authored
56 echo '----------------------------------------------------------------------'
57 echo
58
ec81210 trying to make this goofy chat thing
Justine Tunney authored
59 doit apt-get install --assume-yes \
60 pkg-config memcached libmemcached-dev \
61 g++ curl libssl-dev apache2-utils
62
ec3c2d9 did a bunch of stuff
Justine Tunney authored
63 echo
64 echo '----------------------------------------------------------------------'
65 echo ' INSTALLING NODE.JS '
66 echo '----------------------------------------------------------------------'
67 echo
68
e1461e0 revise readme and install script so more likely to work
Justine Tunney authored
69 apt-get install -q=666 -y nodejs nodejs-dev npm
70
71 if ! node -v >/dev/null 2>&1; then
ec81210 trying to make this goofy chat thing
Justine Tunney authored
72 doit cd /tmp
73 doit wget http://nodejs.org/dist/node-v0.4.9.tar.gz
74 doit tar -xvzf node-v0.4.9.tar.gz
75 doit cd node-v0.4.9
76 doit ./configure
77 doit make -j4
78 doit make install
79 doit rm -rf node-v0.4.9.tar.gz node-v0.4.9
e1461e0 revise readme and install script so more likely to work
Justine Tunney authored
80 else
81 echo 'node.js already installed'
82 fi
83
84 if ! npm -v >/dev/null 2>&1; then
85 echo 'curl http://npmjs.org/install.sh | sudo sh'
86 curl http://npmjs.org/install.sh | sudo sh
87 else
88 echo 'node package manager (npm) already installed'
ec81210 trying to make this goofy chat thing
Justine Tunney authored
89 fi
90
101aa12 initial import
Justine Tunney authored
91 echo
92 echo 'All done!'
Something went wrong with that request. Please try again.