scripts/rvm-ruby-installer in rvm-0.0.35 vs scripts/rvm-ruby-installer in rvm-0.0.36
- old
+ new
@@ -100,11 +100,13 @@
__rvm_run "chmod.bin" chmod +x $rvm_ruby_home/bin/*
__rvm_bin_scripts
__rvm_log "info" "Installation of $rvm_ruby_package_name is complete."
+
__rvm_log "info" "\tInstalling rubygems dedicated to $rvm_ruby_package_name..."
+ GEM_HOME="$rvm_gem_home" ; export GEM_HOME
rvm_gem_package_name="rubygems-1.3.5"
rvm_gem_url="http://rubyforge.org/frs/download.php/60718/$rvm_gem_package_name.tgz"
if [ -d $rvm_source_path/$rvm_gem_package_name ] ; then
cd $rvm_source_path/$rvm_gem_package_name
else
@@ -124,34 +126,29 @@
string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin:' + ENV['PATH']"
awk "NR==2 {print \"$string\"} {print}" $rvm_ruby_home/bin/$binary > $rvm_ruby_home/bin/$binary.new
mv $rvm_ruby_home/bin/$binary.new $rvm_ruby_home/bin/$binary
chmod +x $rvm_ruby_home/bin/$binary
else
- __rvm_log "warn" "$rvm_ruby_home/bin/$binary is missing"
+ __rvm_log "warn" "$rvm_ruby_src_path/bin/$binary is missing"
fi
done
for rvm_gem_name in rake ; do
__rvm_log "info" "Installing $rvm_gem_name"
__rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
done
__rvm_log "info" "Installation of rubygems for $rvm_ruby_package_name is complete."
+
+ binary=rake
if [ -x $rvm_gem_home/bin/$binary ] ; then
+ cp $rvm_gem_home/bin/$binary $rvm_ruby_home/bin/$binary
string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_gem_home'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_gem_home/bin:' + ENV['PATH']"
- mv $rvm_gem_home/bin/$binary $rvm_gem_home/bin/$binary.orig
- awk "NR==2 {print \"$string\"} {print}" $rvm_gem_home/bin/$binary.orig > $rvm_gem_home/bin/$binary
- chmod +x $rvm_gem_home/bin/$binary
+ awk "NR==2 {print \"$string\"} {print}" $rvm_ruby_home/bin/$binary > $rvm_ruby_home/bin/$binary.new
+ mv $rvm_ruby_home/bin/$binary.new $rvm_ruby_home/bin/$binary
+ chmod +x $rvm_ruby_home/bin/$binary
else
__rvm_log "warn" "$rvm_gem_home/bin/$binary is missing"
- fi
-
- binary=rake
- if [ -x $rvm_ruby_home/bin/$binary ] ; then
- mv $rvm_ruby_home/bin/$binary $rvm_gem_home/bin/$binary.orig
- awk "NR==2 {print \"$string\"} {print}" $rvm_gem_home/bin/$binary.orig > $rvm_gem_home/bin/$binary
- else
- __rvm_log "warn" "$rvm_gem_home/bin/$binary is missing."
fi
unset binary
}
function __rvm_install-ruby {