scripts/rubygems in rvm-1.0.6 vs scripts/rubygems in rvm-1.0.7
- old
+ new
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
-source "$rvm_scripts_path/base"
+source "$rvm_path/scripts/base"
result=0
__rvm_become
@@ -18,21 +18,21 @@
else
install=1
fi
if [[ "$install" -eq 0 ]] ; then
- "$rvm_scripts_path/log" "error" "Cannot switch to ${version} for this interpreter."
+ "$rvm_path/scripts/log" "error" "Cannot switch to ${version} for this interpreter."
exit 1
else
- "$rvm_scripts_path/log" "info" "Removing old Rubygems files..."
+ "$rvm_path/scripts/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"
fi
- "$rvm_scripts_path/log" "info" "Installing rubygems dedicated to $rvm_ruby_string..."
+ "$rvm_path/scripts/log" "info" "Installing rubygems dedicated to $rvm_ruby_string..."
rvm_rubygems_version="$version"
rvm_gem_package_name="rubygems-$rvm_rubygems_version"
rvm_rubygems_url=$(__rvm_db "rubygems_${rvm_rubygems_version}_url")
rvm_gem_url="$rvm_rubygems_url/$rvm_gem_package_name.tgz"
@@ -41,27 +41,27 @@
if [[ ! -f "$rvm_src_path/$rvm_gem_package_name/setup.rb" ]]; then
\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"
+ "$rvm_path/scripts/log" "info" "Retrieving $rvm_gem_package_name"
+ "$rvm_path/scripts/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." ; return $result
+ "$rvm_path/scripts/log" "error" "There has been an error while trying to fetch the source. Aborting the installation." ; return $result
fi
\mkdir -p "$rvm_src_path/$rvm_gem_package_name"
__rvm_run "rubygems.extract" "gunzip < $rvm_archives_path/$rvm_gem_package_name.tgz | tar xf - -C $rvm_src_path" "Extracting $rvm_gem_package_name ..."
fi
builtin cd "$rvm_src_path/$rvm_gem_package_name"
__rvm_run "rubygems.install" "GEM_PATH=$rvm_ruby_gem_path GEM_HOME=$rvm_ruby_gem_home BUNDLE_PATH=$rvm_ruby_gem_home $rvm_ruby_home/bin/ruby $rvm_src_path/$rvm_gem_package_name/setup.rb" "Installing rubygems for $rvm_ruby_home/bin/ruby"
result=$?
if [[ "$result" == 0 ]] ; then
- "$rvm_scripts_path/log" "info" "Installation of rubygems completed successfully."
+ "$rvm_path/scripts/log" "info" "Installation of rubygems completed successfully."
else
- "$rvm_scripts_path/log" "warning" "Installation of rubygems did not complete successfully."
+ "$rvm_path/scripts/log" "warning" "Installation of rubygems did not complete successfully."
fi
if [[ ! -z "$rvm_ruby_major_version" ]] ; then
ruby_lib_gem_path="$rvm_ruby_home/lib/ruby/gems/${rvm_ruby_release_version}.${rvm_ruby_major_version}"
else
@@ -78,11 +78,11 @@
unset ruby_lib_gem_path
}
if ! command -v ruby > /dev/null ; then
- "$rvm_scripts_path/log" "error" "'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)"
+ "$rvm_path/scripts/log" "error" "'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)"
exit 1
fi
#
# rvm rubygems use X
@@ -90,10 +90,10 @@
args=($*)
version="${args[0]}"
args="$(echo ${args[@]:1}) " # Strip trailing / leading / extra spacing.
if [[ -z "$version" ]] ; then
- "$rvm_scripts_path/log" "error" "A version must be specified, for example 'rvm rubygems 1.3.7'"
+ "$rvm_path/scripts/log" "error" "A version must be specified, for example 'rvm rubygems 1.3.7'"
exit 1
fi
# Update the rubygems to the current.
if [[ "$version" = "current" ]]; then