equal
deleted
inserted
replaced
1 #!/usr/bin/env bash |
|
2 |
|
3 # This is an RVM Project .rvmrc file, used to automatically load the ruby |
|
4 # development environment upon cd'ing into the directory |
|
5 |
|
6 environment_id="2.0.0@symphony-ssh" |
|
7 |
|
8 if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \ |
|
9 && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]; then |
|
10 echo "Using ${environment_id}" |
|
11 . "${rvm_path:-$HOME/.rvm}/environments/$environment_id" |
|
12 |
|
13 if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]; then |
|
14 . "${rvm_path:-$HOME/.rvm}/hooks/after_use" |
|
15 fi |
|
16 else |
|
17 # If the environment file has not yet been created, use the RVM CLI to select. |
|
18 if ! rvm --create use "$environment_id" |
|
19 then |
|
20 echo "Failed to create RVM environment '${environment_id}'." |
|
21 exit 1 |
|
22 fi |
|
23 fi |
|
24 |
|
25 filename=".rvm.gems" |
|
26 if [[ -s "$filename" ]]; then |
|
27 rvm gemset import "$filename" |
|
28 fi |
|
29 |
|
30 |
|
31 |
|
32 |
|