-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprovision
More file actions
executable file
·33 lines (23 loc) · 889 Bytes
/
provision
File metadata and controls
executable file
·33 lines (23 loc) · 889 Bytes
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
#!/usr/bin/env bash
#set -euo pipefail
#IFS=$'\n\t'
# grab essentials
sudo apt-get update
sudo apt-get install -y build-essential git libssl-dev libreadline-dev zlib1g-dev
# install rbenv and ruby
if [ ! -d "~/.rbenv" ]; then
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo "adding to rbenv bash profile"
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
~/.rbenv/bin/rbenv install 2.3.1
fi
# install nvm and node
if [ ! -d "~/.nvm" ]; then
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | NVM_DIR=~/.nvm bash
echo 'source ~/.bashrc' >> ~/.bash_profile
export NVM_DIR="/home/vagrant/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install 6
fi