Permalink
Browse files

More environment variable changes.

  • Loading branch information...
1 parent 0d8c279 commit 33cb9ddd49a0a335f628b1a89716ae5a69f7728e @xiy committed Apr 12, 2012
Showing with 9 additions and 7 deletions.
  1. +2 −0 .gitignore
  2. +3 −3 binscripts/rvm
  3. +4 −4 scripts/rvm
View
@@ -28,3 +28,5 @@ config/database.yml
test/rvm_test_suite/ruby/config/database.yml
test/rvm_test_suite/ruby/db/config.yml
test/rvm_test_suite/ruby/db/*.sqlite
+
+rvm-test/
View
@@ -3,7 +3,7 @@
if (( ${rvm_ignore_rvmrc:=0} == 0 ))
then
declare rvmrc
- for rvmrc in /etc/rvmrc "$HOME/.rvmrc"
+ for rvmrc in /etc/rvmrc "$OPENSHIFT_DATA_DIR/.rvmrc"
do
if [[ -f "$rvmrc" ]]
then
@@ -29,8 +29,8 @@ if [[ -z "${rvm_path:-}" ]]
then
if (( UID == 0 )) && [[ -d "/usr/local/rvm" ]]
then rvm_path="/usr/local/rvm"
- elif [[ -d "${HOME}/.rvm" ]]
- then rvm_path="${HOME}/.rvm"
+ elif [[ -d "${OPENSHIFT_DATA_DIR}/.rvm" ]]
+ then rvm_path="${OPENSHIFT_DATA_DIR}/.rvm"
elif [[ -d "/usr/local/rvm" ]]
then rvm_path="/usr/local/rvm"
else echo "Can't find rvm install!" 1>&2 ; exit 1
View
@@ -9,13 +9,13 @@
[[ ":$SHELLOPTS:" =~ ":posix:" ]] && return 0 || true
# TODO: Alter the variable names to make sense
-\export HOME rvm_prefix rvm_user_install_flag rvm_path
-HOME="${HOME%%+(\/)}" # Remove trailing slashes if they exist on HOME
+\export OPENSHIFT_DATA_DIR rvm_prefix rvm_user_install_flag rvm_path
+OPENSHIFT_DATA_DIR="${OPENSHIFT_DATA_DIR%%+(\/)}" # Remove trailing slashes if they exist on OPENSHIFT_DATA_DIR
: rvm_stored_umask:${rvm_stored_umask:=$(umask)}
if (( ${rvm_ignore_rvmrc:=0} == 0 ))
then
- for rvmrc in /etc/rvmrc "$HOME/.rvmrc"
+ for rvmrc in /etc/rvmrc "$OPENSHIFT_DATA_DIR/.rvmrc"
do
if [[ -f "$rvmrc" ]]
then
@@ -75,7 +75,7 @@ fi
# guess rvm_user_install_flag if not set
if [[ -z "${rvm_user_install_flag}" ]]
then
- if [[ "${rvm_prefix}" == "${HOME}" ]]
+ if [[ "${rvm_prefix}" == "${OPENSHIFT_DATA_DIR}" ]]
then
rvm_user_install_flag=1
else

0 comments on commit 33cb9dd

Please sign in to comment.