forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rvmrc
35 lines (27 loc) · 973 Bytes
/
.rvmrc
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
#!/bin/bash
ruby_string="ruby-1.8.7"
gemset_name="markus"
# if there is a file called .use-ruby-1.9.3 in the markus repository, then set up
# ruby 1.9.3 instead of the default
if [ -f .use-ruby-1.9.3 ] ; then
ruby_string="ruby-1.9.3"
fi
# if the version of ruby is not installed, install it
if ! rvm list strings | grep -q "${ruby_string}" ; then
rvm install "${ruby_string}"
fi
# rvm use the ruby that was just installed
rvm use ${ruby_string}
# if the gemset is not created, create the gemset
if ! rvm gemset list | grep -q "${gemset_name}" ; then
rvm gemset create ${gemset_name}
fi
rvm gemset use ${gemset_name}
# if bundle is not installed, install bunder
if ! command -v bundle ; then
gem install bundler
fi
# Bundle while redcing excess noise.
echo "\nInstalling gems.... this might take a while depending on how many you \
have yet to install and your internet connection. Please wait.\n"
bundle | grep -v 'Using' | grep -v 'complete' | sed '/^$/d'