scripts/utility in rvm-0.0.50 vs scripts/utility in rvm-0.0.51
- old
+ new
@@ -78,14 +78,15 @@
}
function __rvm_gi { gem install -q --no-rdoc --no-ri $* ; }
function __rvm_run {
- log_file_name="$1" ; shift
- command="$*"
+ log_file_name="$1" ; command="$2" ; message="$3"
rvm_ruby_log_path=${rvm_ruby_log_path:-$rvm_path/log}
- mkdir -p $rvm_ruby_log_path
+ mkdir -p `dirname $rvm_ruby_log_path/$log_file_name.log`
+
+ if [ ! -z "$message" ] ; then __rvm_log "info" "$message" ; fi
__rvm_log "debug" "Executing: $command"
touch $rvm_ruby_log_path/$log_file_name.log $rvm_ruby_log_path/$log_file_name.error.log # for zsh :(
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $command" | tee $rvm_ruby_log_path/$log_file_name.log > $rvm_ruby_log_path/$log_file_name.error.log
if [ -z "$rvm_niceness" -o "$rvm_niceness" = "0" ] ; then
eval "$command" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log
@@ -538,11 +539,10 @@
else
eval "errors=(${errors[*]} $rvm_ruby_string)"
fi
eval "rubies=(${rubies[*]} $rvm_ruby_string)"
eval "statuses=(${statuses[*]} $result)"
- # TODO: keep track of and re-set the previous selected ruby ;)
else
__rvm_log "warn" "'$rvm_ruby_home/bin/$binary' either does not exist or is not executable? :("
fi
unset rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_configure rvm_ruby_make rvm_ruby_make_install rvm_ruby_rev rvm_ruby_tag rvm_major_version rvm_minor_version rvm_gem_set_name rvm_gem_home rvm_ruby_binary rvm_ruby_package_name rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_selected
}
@@ -797,35 +797,35 @@
#
# ruby supporting libraries:
#
function __rvm_readline_install {
__rvm_pushpop $rvm_source_path
- package="readline" ; version="5.2"
+ package="readline" ; version="5.2" ; archive_format="tar.gz"
# TODO: Figure out how to list, grab and apply the patches
- __rvm_fetch "ftp://ftp.gnu.org/gnu/readline/$package-$version.tar.gz"
- __rvm_run "$package.extract" tar zxf $rvm_archives_path/$package-$version.tar.gz -C $rvm_source_path
+ __rvm_run "$package/fetch" "__rvm_fetch ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format" "Retrieving $package-$version.$archive_format"
+ __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_source_path" "Extracting $package-$version.$archive_format"
cd $rvm_source_path/$package-$version
if [ "`uname`" = "Darwin" ] ; then
sdk=`ls -t /Developer/SDKs/ | head -n 1`
CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
export CFLAGS LDFLAGS
- __rvm_run "$package.configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared"
+ __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
else
- __rvm_run "$package.configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared"
+ __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
fi
- __rvm_run "$package.make" "/usr/bin/make $rvm_make_flags"
- __rvm_run "$package.make.install" "/usr/bin/make install"
+ __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
+ __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
__rvm_pushpop
}
function __rvm_iconv_install {
__rvm_pushpop $rvm_source_path
- package="libiconv" ; version=1.13.1
- __rvm_fetch "http://ftp.gnu.org/pub/gnu/libiconv/$package-$version.tar.gz"
- __rvm_run "$package.extract" "tar zxf $rvm_archives_path/$package-$version.tar.gz -C $rvm_source_path"
+ package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
+ __rvm_run "$package/fetch" "__rvm_fetch http://ftp.gnu.org/pub/gnu/libiconv/$package-$version.$archive_format" "Retrieving $package-$version.$archive_format"
+ __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_source_path" "Extracting $package-$version.$archive_format"
cd $rvm_source_path/$package-$version
- __rvm_run "$package.configure" "./configure --prefix=$rvm_path/usr --disable-shared"
- __rvm_run "$package.make" "/usr/bin/make $rvm_make_flags"
- __rvm_run "$package.make.install" "/usr/bin/make install"
+ __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-static --enable-shared" "Configuring $package."
+ __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
+ __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
__rvm_pushpop
}