-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·49 lines (35 loc) · 942 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·49 lines (35 loc) · 942 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
sudo yum -y update
sudo yum -y groupinstall "Development Tools"
#
# Install rbenv
# -------------------------------------------
if ! command -v rbenv > /dev/null; then
RBENV_ROOT="${HOME}/.rbenv"
PLUGINS=(
"sstephenson/ruby-build"
"sstephenson/rbenv-default-gems"
"sstephenson/rbenv-gem-rehash"
"rkh/rbenv-update"
"jf/rbenv-gemset"
)
# Install rbenv
git clone https://github.com/sstephenson/rbenv.git $RBENV_ROOT
# Install rbenv plugins
for plugin in "${PLUGINS[@]}"; do
KEY=${plugin%%/*}
VALUE=${plugin#*/}
git clone https://github.com/$KEY/$VALUE.git "${RBENV_ROOT}/plugins/$VALUE"
done
# Add rbenv-default-gems
cat << EOF > "${RBENV_ROOT}/default-gems"
bundler
pry
ruby-debug-ide
debase
EOF
# Add rbenv to PATH
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
fi