-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinitial-setup.sh
More file actions
executable file
·58 lines (49 loc) · 1.66 KB
/
Copy pathinitial-setup.sh
File metadata and controls
executable file
·58 lines (49 loc) · 1.66 KB
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
#!/bin/bash
# Based on instructions from http://elinux.org/RPi_Advanced_Setup
set -e #die if we encounter an error
# check root permissions
if [[ $UID != 0 ]]; then
echo "Please start the script as root or sudo!"
exit 1
fi
# update the packages that we already have
apt-get update
apt-get upgrade --yes
# install avahi for easier SSH access
apt-get --yes install avahi-daemon
insserv avahi-daemon
cp avahi-config /etc/avahi/services/multiple.service
/etc/init.d/avahi-daemon restart
# install nodejs into /usr/local/node-xxx
mkdir /tmp/node
pushd /tmp/node
NODENAME=node-v0.10.17-linux-arm-pi
wget --output-document=/tmp/node/$NODENAME.tar.gz http://nodejs.org/dist/v0.10.17/$NODENAME.tar.gz
tar xvzf /tmp/node/$NODENAME.tar.gz
mv -v /tmp/node/$NODENAME/ /usr/local/$NODENAME
popd
rm -rfv /tmp/node
#add nodejs to path
#there must be a nicer way of doing this...
echo "export PATH=\$PATH:/usr/local/$NODENAME/bin" >> /home/pi/.bashrc
# install nodejs into /usr/local/node-xxx
mkdir /tmp/phantomjs
pushd /tmp/phantomjs
wget https://github.com/aeberhardo/phantomjs-linux-armv6l/archive/master.zip
unzip master.zip
cd phantomjs-linux-armv6l-master
bunzip2 *.bz2 && tar xf *.tar
mv -v phantomjs-1.9.0-linux-armv6l /usr/local/phantomjs-1.9.0-linux-armv6l
popd
rm -rfv /tmp/phantomjs
#add phantomjs to path
echo "export PATH=\$PATH:/usr/local/phantomjs-1.9.0-linux-armv6l/bin" >> /home/pi/.bashrc
# install casperjs from git
git clone git://github.com/n1k0/casperjs.git /usr/local/casperjs
pushd /usr/local/casperjs
git checkout tags/1.0.2
popd
# add casperjs to path
echo "export PATH=\$PATH:/usr/local/casperjs/bin" >> /home/pi/.bashrc
# install mercurial
apt-get install mercurial --yes