-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsetup-vm.sh
executable file
·34 lines (28 loc) · 915 Bytes
/
setup-vm.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
#!/bin/bash
set -eu
NODE_VERSION="v0.8.15"
echo "-> Installing apt-get packages"
sudo apt-get -y install \
build-essential \
curl
echo "-> Installing node.js"
if [ ! -d /home/vagrant/node ]; then
curl -O http://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz
tar -zxf node-${NODE_VERSION}.tar.gz
mv node-${NODE_VERSION} node
chown -R vagrant:vagrant node
rm -rf node-${NODE_VERSION}.tar.gz
fi
cd node
# Unfortunately we can't put this into our project dir as vboxfs complains
# about hardlinks in the tar : /
echo "-> Installing code sourcer (arm toolchain)"
if [ ! -d /home/vagrant/armtools ]; then
cd ~
tarball="arm-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2"
curl -OL http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/${tarball}
tar -xf ${tarball}
mv arm-2012.03 armtools
chown -R vagrant:vagrant armtools
rm -rf ${tarball}
fi