scripts/utility in rvm-0.1.22 vs scripts/utility in rvm-0.1.23
- old
+ new
@@ -405,11 +405,11 @@
done < <(svn list http://svn.ruby-lang.org/repos/ruby/tags/ | awk '/^v1_[8|9]/')
echo -e "(ruby-)1.8.6(-p383)\n(ruby-)1.8.6-head\n(ruby-)1.8.7(-p248)\n(ruby-)1.8.7-head\n(ruby-)1.9.1(-p243)\n(ruby-)1.9.1(-p376)\n(ruby-)1.9.1-head\n(ruby-)1.9.2-preview1"
echo -e "jruby-1.2.0\njruby-1.3.1\njruby(-1.4.0) # the default\njruby-head"
echo -e "rbx(-prc1) # default\nrbx-head"
echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
- echo -e "maglev(-22907)\nmaglev-head"
+ echo -e "maglev(-22949)\nmaglev-head"
echo -e "mput(-head) # shyouhei head, the default mput"
echo -e "ironruby-0.9.3\nironruby-1.0-rc2\nironruby-head"
if [[ "Darwin" = "$(uname)" ]] ; then
echo -e "macruby(-nightly) # the default macruby\nmacruby-head # Build from the macruby git repository"
fi
@@ -666,23 +666,28 @@
rvm_ruby_gem_path="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
# TODO: Remove next section after a several releases.
# Migrate original rvm global gem cache directory to $HOME/.gem/cache
- if [[ -d "$rvm_path/gems/cache" ]] && [[ ! -L "$rvm_path/gems/cache" ]] ; then
- if [[ ! -z "$(ls -A "$rvm_path"/gems/cache/)" ]] ; then
- mv $rvm_path/gems/cache/* $HOME/.gem/cache/
+ if [[ "$(whoami)" != "root" ]] ; then
+ if [[ -d "$rvm_path/gems/cache" ]] && [[ ! -L "$rvm_path/gems/cache" ]] ; then
+ if [[ ! -z "$(ls -A "$rvm_path"/gems/cache/)" ]] ; then
+ mv $rvm_path/gems/cache/* $HOME/.gem/cache/
+ fi
+ rmdir $rvm_path/gems/cache
fi
- rmdir $rvm_path/gems/cache
- fi
- # Some sanity checking.
- if [[ ! -e "$rvm_gems_cache_path" ]] ; then mkdir -p $rvm_gems_cache_path ; fi
+ # Some sanity checking.
+ if [[ ! -d "$rvm_gems_cache_path" ]] ; then
+ mkdir -p $rvm_gems_cache_path
+ fi
+ if [[ "$rvm_gems_cache_path" != "$rvm_gems_path/cache" ]] ; then
+ rm -f "$rvm_gems_path/cache"
+ ln -nfs "$rvm_gems_cache_path" "$rvm_gems_path/cache"
+ fi
+ fi
chmod u+w "$rvm_gems_cache_path"
- rm -f "$rvm_gems_path/cache"
- ln -nfs "$rvm_gems_cache_path" "$rvm_gems_path/cache"
- chmod u+w "$rvm_gems_cache_path"
# /TODO
# Careful not to nuke system gems cache.
if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ ! -z "$(echo $rvm_ruby_gem_home | awk '/rvm/')" ]] ; then
# Ensure that the ruby gem home exists.
@@ -722,9 +727,10 @@
rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/%.*$//')%$rvm_gemset_name"
GEM_HOME="$rvm_ruby_gem_home"
BUNDLE_PATH="$rvm_ruby_gem_home"
GEM_PATH="$rvm_ruby_gem_home/bin:$(echo $GEM_HOME | sed 's/%.*$//')%global/bin"
export rvm_ruby_gem_home GEM_HOME BUNDLE_PATH GEM_PATH
+ __rvm_use
fi
return 0
}
__rvm_mono_env() {