blob: 4eb6111aa070c977d04dcdb8cca22976b20ad7b1 (
plain)
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
|
#!/usr/bin/env bash
ruby_string="ruby-1.9.3"
gemset_name="jekyll-blog"
if rvm list strings | grep -q "${ruby_string}" ; then
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
&& -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
\. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
else
if ! rvm --create "${ruby_string}@${gemset_name}"
then
echo "Failed to create RVM environment '${ruby_string}@${gemset_name}'."
fi
fi
if ! command -v bundle ; then
gem install bundler
fi
if [[ -e Gemfile ]]; then
bundle install
fi
else
echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
fi
|