11#! /usr/bin/env bash
2- # Install rvm
2+ # Install gauntlt using rvm
3+
34# Set bash unofficial strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/
45set -euo pipefail
56IFS=$' \n\t '
@@ -10,6 +11,11 @@ ${DEBUG:-false} && set -vx
1011# and http://wiki.bash-hackers.org/scripting/debuggingtips
1112export PS4=' +(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
1213
14+ # Credit to http://stackoverflow.com/a/246128/424301
15+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
16+ # shellcheck disable=SC1090
17+ . " $DIR /common.sh"
18+
1319function quick_yum_install() {
1420 declare package
1521 package=${1?" You must specify a package to install" }
@@ -25,15 +31,30 @@ if [[ ! -f /etc/profile.d/rvm.sh ]]; then
2531 curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
2632 curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
2733 curl -L get.rvm.io | bash -s stable
34+ # rvm hates the bash options -eu
35+ set +eu
2836 # shellcheck disable=SC1091
2937 source /etc/profile.d/rvm.sh
3038 rvm reload
3139 rvm requirements run
32- rvm install 2.6.0
40+ else
41+ echo " rvm already installed"
3342fi
43+ # rvm hates the bash options -eu
44+ set +eu
45+ # shellcheck disable=SC1091
46+ source /etc/profile.d/rvm.sh
47+ rvm reload
48+ rvm install 2.6.0
3449rvm alias create default ruby-2.6.0
3550rvm list
3651rvm use 2.6 --default
52+ set -eu
53+ if is_ec2; then
54+ usermod -a -G rvm centos
55+ else
56+ usermod -a -G rvm vagrant
57+ fi
3758ruby --version
3859
39- gem list gauntlt || gem install gauntlt
60+ gem list gauntlt || gem install gauntlt --no-ri --no-rdoc
0 commit comments