scripts/package in rvm-1.0.6 vs scripts/package in rvm-1.0.7

- old
+ new

@@ -1,11 +1,11 @@ #!/usr/bin/env bash if [[ "$rvm_trace_flag" -eq 2 ]] ; then set -x ; export rvm_trace_flag ; fi rvm_base_except="selector" -source "$rvm_scripts_path/base" +source "$rvm_path/scripts/base" # Tools to make managing ruby dependencies inside of rvm easier. args=($*) action="${args[0]:-""}" library="${args[1]:-""}" @@ -18,22 +18,22 @@ if [[ ! -z "$rvm_make_flags_flag" ]] ; then __rvm_make_flags ; fi ( builtin cd "$rvm_src_path" - "$rvm_scripts_path/log" "info" "Fetching $package-$version.$archive_format to $rvm_archives_path" + "$rvm_path/scripts/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_path/scripts/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_path/scripts/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_path/scripts/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 @@ -51,11 +51,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_path/scripts/db" "$rvm_config_path/packages" "${package}" "${version}" ) } readline() { package="readline" ; archive_format="tar.gz" @@ -79,15 +79,15 @@ 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_path/scripts/match" "$rvm_archflags" "64"; then hw_cpu64bit=1 fi - if "$rvm_scripts_path/match" "$rvm_archflags" "ppc"; then + if "$rvm_path/scripts/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}') @@ -107,11 +107,13 @@ else openssl_os="darwin-i386-cc" fi fi configure_command="./Configure" - patches="$rvm_patches_path/$package/Makefile.org.patch,$rvm_patches_path/$package/crypto-Makefile.patch" + + patches="$rvm_path/patches/$package/Makefile.org.patch,$rvm_patch/patches/$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]]*//") fi else @@ -190,18 +192,22 @@ fi ) } if [[ -n "$library" ]] ; then + case $library in readline|iconv|curl|openssl|zlib|autoconf|ncurses|pkgconfig|gettext|glib|mono|llvm|libxml2) ${library} ;; *) - "$rvm_scripts_path/log" "error" "Package '${library}' is unknown." + "$rvm_path/scripts/log" "error" "Package '${library}' is unknown." ;; esac + + exit $? + 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_path/scripts/log" "info" \ + "Usage: 'rvm package {install,uninstall} {readline,iconv,curl,openssl,zlib,autoconf,ncurses,pkgconfig,gettext,glib,mono,llvm,libxml2}'" exit 1 fi -