scripts/package in rvm-1.0.1 vs scripts/package in rvm-1.0.2

- old
+ new

@@ -2,32 +2,32 @@ rvm_base_except="selector" source "$rvm_scripts_path/base" # Tools to make managing ruby dependencies inside of rvm easier. -action="$(echo "$*" | awk '{print $1}')" -library="$(echo "$*" | awk '{print $2}')" -args=$(echo "$*" | awk '{$1="" ; $2="" ; print}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') +action="$1" ; shift +library="$1" ; shift +args="$(echo $*) " # Strip trailing / leading / extra spacing. install_package() { __rvm_db "${package}_url" "package_url" if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi - __rvm_pushpop $rvm_src_path + __rvm_pushpop "$rvm_src_path" - $rvm_scripts_path/log "info" "Fetching $package-$version.$archive_format to $rvm_archives_path" + "$rvm_scripts_path/log" "info" "Fetching $package-$version.$archive_format to $rvm_archives_path" if [[ "$archive_format" = "tar.gz" ]] || [[ "$archive_format" = "tgz" ]] ; then - $rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result) + "$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result) __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path" elif [[ "$archive_format" = "tar.bz2" ]] ; then - $rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result) + "$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result) __rvm_run "$package/extract" "tar jxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format to $rvm_src_path" elif [[ "$archive_format" = "zip" ]] ; then - $rvm_scripts_path/fetch "$package_url/$package-$version.$archive_format" || (result=$? && return $result) + "$rvm_scripts_path/fetch" "$package_url/$package-$version.$archive_format" || (result=$? && return $result) __rvm_run "$package/extract" "unzip -q -o $rvm_archives_path/$package-$version.$archive_format -d $rvm_src_path/$package-$version" "Extracting $package-$version.$archive_format to $rvm_src_path" else printf "\nUnrecognized archive format '$archive_format'" ; return 1 fi @@ -43,11 +43,11 @@ __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package in $rvm_src_path/$package-$version." __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_usr_path" fi \touch "$rvm_config_path/packages" - $rvm_scripts_path/db "$rvm_config_path/packages" "${package}" "${version}" + "$rvm_scripts_path/db" "$rvm_config_path/packages" "${package}" "${version}" __rvm_pushpop } readline() { @@ -70,14 +70,14 @@ openssl() { package="openssl" ; version="0.9.8n" ; archive_format="tar.gz" if [[ "Darwin" = "$(uname)" ]] ; then if [[ ! -z "$rvm_archflags" ]]; then - if $rvm_scripts_path/match "$rvm_archflags" "64"; then + if "$rvm_scripts_path/match" "$rvm_archflags" "64"; then hw_cpu64bit=1 fi - if $rvm_scripts_path/match "$rvm_archflags" "ppc"; then + if "$rvm_scripts_path/match" "$rvm_archflags" "ppc"; then hw_machine="Power Macintosh" fi else hw_machine=$(sysctl hw.machine | awk -F: '{print $2}' | sed 's/^ //') hw_cpu64bit=$(sysctl hw.cpu64bit_capable | awk '{print $2}') @@ -97,11 +97,11 @@ fi configure_command="./Configure" patches="$rvm_patches_path/$package/Makefile.org.patch,$rvm_patches_path/$package/crypto-Makefile.patch" # Don't use -j option for make OpenSSL if [[ ! -z "$rvm_make_flags" ]] ; then - rvm_make_flags=$(echo $rvm_make_flags | sed -e "s/-j[[:space:]]*[[0-9]]*//") + rvm_make_flags=$(echo "$rvm_make_flags" | sed -e "s/-j[[:space:]]*[[0-9]]*//") fi else configure_command="./config" fi configure="$configure_command $openssl_os -I$rvm_usr_path/include -L$rvm_usr_path/lib --prefix=$rvm_usr_path zlib no-asm no-krb5 shared" @@ -179,12 +179,12 @@ if [[ ! -z "$library" ]] ; then if [[ " readline iconv curl openssl zlib autoconf ncurses pkgconfig gettext glib mono llvm libxml2 " =~ "$library" ]] ; then ${library} else - $rvm_scripts_path/log "error" "Package '${library}' is unknown." + "$rvm_scripts_path/log" "error" "Package '${library}' is unknown." fi else - $rvm_scripts_path/log "info" "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'" + "$rvm_scripts_path/log" "info" "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'" exit 1 fi