Skip to content

Commit

Permalink
Bugfix: 'rvm reload' now works again :)
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Nov 27, 2009
1 parent 111ed07 commit 80d0b54
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/array
Expand Up @@ -17,7 +17,7 @@ array_length() {
array=$1
eval "length=\${#${array}[*]}"
echo $length
return length
return $length
}

array_push() {
Expand Down
5 changes: 4 additions & 1 deletion scripts/cli
Expand Up @@ -358,7 +358,10 @@ rvm() {
$rvm_scripts_path/monitor ; result=$?
;;
notes) $rvm_scripts_path/notes ; result=$? ;;
reload) source "$rvm_path/scripts/rvm" ;;
reload)
shift;shift;unset rvm_action;
source "$rvm_path/scripts/rvm"
;;
install|uninstall) __rvm_manage_rubies ; result=$? ;;
tests|specs) rvm_action="rake" ; __rvm_do ; result=$? ;;

Expand Down
10 changes: 7 additions & 3 deletions scripts/monitor
@@ -1,11 +1,15 @@
#!/usr/bin/env bash

rvm_monitor_sleep=3
set -x
original_ruby_version=$rvm_ruby_version
original_ruby_string=$rvm_ruby_string

source $rvm_scripts_path/rvm

rvm_monitor_sleep="${rvm_monitor_sleep:-3}"

trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15

timestamp() {
if [[ "Darwin" = "$(uname)" ]] ; then
echo $(stat -f "%m" $1)
Expand All @@ -26,8 +30,8 @@ push_if_timestamp_changed() {

update_timestamp() {
if [[ -d "${1}/" ]] ; then
touch "$rvm_path/${1}_timestamp"
eval "${1}_timestamp=\$(timestamp \"$rvm_path/${1}_timestamp\")"
touch "$rvm_path/${$}_${1}_timestamp"
eval "${1}_timestamp=\$(timestamp \"$rvm_path/${$}_${1}_timestamp\")"
fi
}

Expand Down

0 comments on commit 80d0b54

Please sign in to comment.