Skip to content

Commit

Permalink
Try this one Pistos.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Mar 4, 2010
1 parent f86cac7 commit 41635f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/utility
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ __rvm_gemset_select() {

# TODO: Remove next section after a several releases.
# Migrate original rvm global gem cache directory to $HOME/.gem/cache
if [[ "$(whoami)" != "root" ]] ; then
if [[ "$(whoami)" != "root" ]] && [[ "$rvm_gems_cache_path" =~ $HOME ]] ; 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/
Expand All @@ -680,7 +680,7 @@ __rvm_gemset_select() {
if [[ ! -d "$rvm_gems_cache_path" ]] ; then
mkdir -p $rvm_gems_cache_path
fi
if [[ "$rvm_gems_cache_path" != "$rvm_gems_path/cache" ]] && [[ "$rvm_gems_cache_path" =~ $HOME ]] ; then
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"
chmod u+w "$rvm_gems_cache_path"
Expand Down

0 comments on commit 41635f1

Please sign in to comment.