scripts/rubygems in rvm-0.1.45 vs scripts/rubygems in rvm-0.1.46
- old
+ new
@@ -25,11 +25,11 @@
else
$rvm_scripts_path/log "info" "Removing old Rubygems files..."
rubygems_dir="$(ruby -rrbconfig -e "puts Config::CONFIG.values_at('sitelibdir','vendorlibdir').detect {|path| File.directory?(File.join(path, 'rubygems')) }.to_s")"
if [[ -n "$rubygems_dir" && -d "$rubygems_dir" ]]; then
# Remove common files installed by ruby gems.
- rm -rf "${rubygems_dir}/ubygems.rb" "${rubygems_dir}/rubygems.rb" "${rubygems_dir}/rubygems" "${rubygems_dir}/gauntlet_rubygems.rb"
+ \rm -rf "${rubygems_dir}/ubygems.rb" "${rubygems_dir}/rubygems.rb" "${rubygems_dir}/rubygems" "${rubygems_dir}/gauntlet_rubygems.rb"
fi
$rvm_scripts_path/log "info" "Installing rubygems dedicated to $rvm_ruby_string..."
rvm_rubygems_version="$version"
rvm_gem_package_name="rubygems-$rvm_rubygems_version"
@@ -37,20 +37,20 @@
rvm_gem_url="$rvm_rubygems_url/$rvm_gem_package_name.tgz"
# Sanity check... If setup.rb is missing from the rubygems source path,
# something went wrong. Cleanup, aisle 3!
if [[ ! -f "$rvm_src_path/$rvm_gem_package_name/setup.rb" ]]; then
- rm -rf "$rvm_src_path/$rvm_gem_package_name"
+ \rm -rf "$rvm_src_path/$rvm_gem_package_name"
fi
if [[ ! -d "$rvm_src_path/$rvm_gem_package_name" ]] ; then
$rvm_scripts_path/log "info" "Retrieving $rvm_gem_package_name"
$rvm_scripts_path/fetch "$rvm_gem_url"
result=$? ; if [[ "$result" -gt 0 ]] ; then
$rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
fi
- mkdir -p "$rvm_src_path/$rvm_gem_package_name"
+ \mkdir -p "$rvm_src_path/$rvm_gem_package_name"
__rvm_run "rubygems.extract" "cat $rvm_archives_path/$rvm_gem_package_name.tgz | gunzip | tar xf - -C $rvm_src_path" "Extracting $rvm_gem_package_name ..."
fi
builtin cd "$rvm_src_path/$rvm_gem_package_name"
@@ -68,13 +68,13 @@
ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/$interpreter"
fi
fi
# Add ruby's gem path to ruby's lib direcotry.
- mkdir -p "$(dirname $ruby_lib_gem_path)"
+ \mkdir -p "$(dirname $ruby_lib_gem_path)"
- if [[ -d "$ruby_lib_gem_path" ]] ; then rm -rf "$ruby_lib_gem_path" ; fi
+ if [[ -d "$ruby_lib_gem_path" ]] ; then \rm -rf "$ruby_lib_gem_path" ; fi
ln -nfs "$rvm_ruby_gem_home" "$ruby_lib_gem_path"
unset ruby_lib_gem_path
}
@@ -87,10 +87,10 @@
#
# rvm rubygems use X
#
if [[ $# -gt 0 ]] ; then
version="$1" ; shift
- args="$(echo "$@" | __rvm_strip)"
+ args="$(echo "$@" | __rvm_strip)"
else
$rvm_scripts_path/log "error" "A version must be specified, for example 'rvm rubygems 1.3.7'"
exit 1
fi