Permalink
Browse files

Change % to @ during update in default file.

  • Loading branch information...
1 parent 313418e commit b4136b67355555bcc1a4ab90b7620e8fa6916b79 @wayneeseguin wayneeseguin committed Apr 5, 2010
Showing with 10 additions and 2 deletions.
  1. +10 −2 scripts/install
View
@@ -195,14 +195,16 @@ done
# Migrate old gemset directories to new gemset pattern.
#
spinner
-echo -e -n "\r*"
+echo -e -n "\r*" # Stop spinner.
+
for gemset in $rvm_path/gems/*\%* ; do
new_path=${gemset/\%/${rvm_gemset_separator}}
if [[ -d "$gemset" ]] && [[ ! -d "$new_path" ]] ; then
echo -e " Renaming $(basename $gemset) to $(basename $new_path) for new gemset separator."
mv $gemset $new_path
fi
done
+
for gemset in $rvm_path/gems/*\+* ; do
new_path=${gemset/\+/${rvm_gemset_separator}}
if [[ -d "$gemset" ]] && [[ ! -d "$new_path" ]] ; then
@@ -217,6 +219,13 @@ for gemset in $rvm_path/gems/*\@ ; do
mv $gemset $new_path
fi
done
+
+# Upgrade any default file.
+if grep -q '\%' $rvm_config_path/default ; then
+ sed -e 's#\%#'$rvm_gemset_separator'#g' > $rvm_config_path/default.new
+ mv $rvm_config_path/default.new $rvm_config_path/default
+fi
+
#
# End of gemset migration.
#
@@ -230,7 +239,6 @@ if [[ "root" = "$(whoami)" ]] ; then
chmod +x $rvm_symlink_path/rvmsudo
fi
-
if [[ "$upgrade_flag" -eq 0 ]] ; then
echo -e "\n********************************************************************************"
./scripts/notes

0 comments on commit b4136b6

Please sign in to comment.