scripts/ruby-installer in rvm-0.0.52 vs scripts/ruby-installer in rvm-0.0.53
- old
+ new
@@ -14,16 +14,17 @@
result=0
if [ -z "$rvm_ruby_tag" -a -z "$rvm_ruby_rev" ] ; then
if [ ! -f $rvm_archives_path/$rvm_ruby_package_name.tar.gz ] ; then
rvm_url="${rvm_url:-"ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_name.tar.gz"}"
- __rvm_run "fetch" "__rvm_fetch $rvm_url" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
+ __rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
+ __rvm_fetch $rvm_url
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
- mkdir -p $rvm_ruby_src_path # Is this line necessary considering -C below? v
- __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path" "Extracting $rvm_ruby_package_name ..."
- if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
fi
+ mkdir -p $rvm_ruby_src_path # Is this line necessary considering -C below? v
+ __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path" "Extracting $rvm_ruby_package_name ..."
+ if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
else
__rvm_log "info" "Retrieving Ruby from $rvm_url"
if [ ! -z "`echo $rvm_url | awk '/^git/'`" ] ; then
if [ -d "$rvm_ruby_src_path/.git" ] ; then
cd $rvm_ruby_src_path
@@ -39,11 +40,11 @@
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
fi
else
if [ -z "$rvm_ruby_rev" ] ; then
# TODO: Check if tag v is valid
- rvm_url=$rvm_ruby_repo_url/tags/$rvm_ruby_tag
+ rvm_url="$rvm_ruby_repo_url/tags/$rvm_ruby_tag"
rvm_rev=""
else
if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
rvm_url="$rvm_ruby_repo_url/trunk"
rvm_rev=""
@@ -123,11 +124,12 @@
case "$rvm_ruby_interpreter" in
macruby)
if [ "`uname`" = "Darwin" ] ; then
rvm_url=`__rvm_db "macruby_nightly_url"`
- __rvm_run "macruby/fetch" "__rvm_fetch $rvm_url" "Retrieving latest macruby" # $rvm_archives_path/macruby_nightly.pkg
+ __rvm_log "info" "Retrieving latest macruby" # $rvm_archives_path/macruby_nightly.pkg
+ __rvm_fetch $rvm_url
mv $rvm_archives_path/latest $rvm_archives_path/macruby_nightly.pkg
__rvm_run "macruby/extract" "xar -x -f $rvm_archives_path/macruby_nightly.pkg -C $rvm_ruby_home" "Extracting macruby nightly package."
else
__rvm_log "fail" "MacRuby can only be installed on a Darwin OS."
fi
@@ -141,11 +143,12 @@
__rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_ruby_home"
__rvm_pushpop $rvm_source_path
if [ -d $rvm_ruby_src_path ] ; then
cd $rvm_ruby_src_path
else
- __rvm_run "fetch" "__rvm_fetch $rvm_url" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
+ __rvm_log "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
+ __rvm_fetch $rvm_url
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
mkdir -p $rvm_ruby_src_path
__rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path" "Extracting $rvm_ruby_package_name..."
if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
fi
@@ -281,11 +284,12 @@
cd $rvm_ruby_src_path
else
if [ -z "$rvm_force_flag" -a -f $rvm_package_file -a -s $rvm_package_file ] ; then
__rvm_log "info" "It appears that $rvm_package_file has already been downloaded, skipping. Use --force to force re-download."
else
- __rvm_run "fetch" "__rvm_fetch $rvm_url" "Downloading $rvm_package_file, this may take a while depending on your connection..."
+ __rvm_log "info" "Downloading $rvm_package_file, this may take a while depending on your connection..."
+ __rvm_fetch $rvm_url
fi
rvm_unzip=`which unzip`
if [ $? -ne 0 ] ; then
__rvm_log "error" "'unzip' was not found in your PATH. jRuby official release comes as a .zip file, hence 'unzip' is required to extract it. Please install 'unzip' and try again."
else
@@ -481,10 +485,11 @@
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
- __rvm_run "rubygems.fetch" "__rvm_fetch $rvm_gem_url" "Retrieving $rvm_gem_package_name"
+ __rvm_log "info" "Retrieving $rvm_gem_package_name"
+ __rvm_fetch $rvm_gem_url
mkdir -p $rvm_source_path/$rvm_gem_package_name
__rvm_run "rubygems.extract" "tar zxf $rvm_archives_path/$rvm_gem_package_name.tgz -C $rvm_source_path" "Extracting $rvm_gem_package_name"
fi
__rvm_run "rubygems.install" "GEM_PATH=$rvm_gem_path GEM_HOME=$rvm_gem_home $rvm_ruby_home/bin/ruby $rvm_source_path/$rvm_gem_package_name/setup.rb" "Installing rubygems for $rvm_ruby_home/bin/ruby"
result=$?