scripts/gemsets in rvm-1.0.10 vs scripts/gemsets in rvm-1.0.11
- old
+ new
@@ -306,13 +306,16 @@
# Migrate gemsets from ruby X to ruby Y
gemset_copy() {
local source_ruby destination_ruby source_path destination_path
- source_ruby="${args[1]:-""}"
- destination_ruby="${args[2]:-""}"
+ source_ruby="${args[__array_start]:-""}"
+ args[$__array_start]="" ; args=(${args[@]})
+ destination_ruby="${args[__array_start]:-""}"
+ args[$__array_start]="" ; args=(${args[@]})
+
if [[ -z "$destination_ruby" || -z "$source_ruby" ]] ; then
"$rvm_path/scripts/log" "error" "Source and destination must be specified: 'rvm gemset copy X Y'"
return 1
fi
@@ -342,10 +345,10 @@
for dir in bin doc gems specifications cache ; do
mkdir -p "$destination_path/$dir"
- if [[ -d "$source_ruby/$dir" ]] ; then
+ if [[ -d "$source_path/$dir" ]] ; then
cp -Rf "$source_path/$dir" "$destination_path/"
elif [[ -L "$source_path/$dir" ]] ; then
cp "$source_path/$dir" "$destination_path/$dir"
fi