scripts/utility in rvm-0.0.9999 vs scripts/utility in rvm-0.1.0

- old
+ new

@@ -74,13 +74,13 @@ $rvm_scripts_path/log "debug" "$file_name:\n$(grep 'rvm' $file_name 2>/dev/null)" fi done if [[ "root" = "$(whoami)" ]] ; then - debug_files="$rvm_path/default $rvm_path/system $rvm_path/config/db /etc/rvmrc /etc/gemrc" + debug_files="$rvm_path/default $rvm_path/system $rvm_config_path/db /etc/rvmrc /etc/gemrc" else - debug_files="$rvm_path/default $rvm_path/system $rvm_path/config/db $HOME/.rvmrc $HOME/.gemrc" + debug_files="$rvm_path/default $rvm_path/system $rvm_config_path/db $HOME/.rvmrc $HOME/.gemrc" fi for file_name in $(echo $debug_files); do if [[ -f "$file_name" ]] && [[ -s "$file_name" ]] ; then $rvm_scripts_path/log "debug" "$file_name (filtered):\n$(cat $file_name | awk '!/assword|_key/')\n" @@ -111,11 +111,11 @@ __rvm_gi() { gem install $rvm_gem_options $* ; } __rvm_run() { log_file_name="$1" ; command="$2" ; message="$3" - rvm_ruby_log_path="${rvm_ruby_log_path:-$rvm_path/log}" + rvm_ruby_log_path="${rvm_ruby_log_path:-$rvm_log_path}" mkdir -p $(dirname "$rvm_ruby_log_path/$log_file_name.log") if [[ ! -z "$message" ]] ; then $rvm_scripts_path/log "info" "$message" ; fi if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Executing: $command" @@ -145,11 +145,11 @@ if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi } __rvm_bin_scripts() { - for rvm_ruby_binary in $rvm_path/*/bin/ruby ; do + for rvm_ruby_binary in $rvm_rubies_path/*/bin/ruby ; do if [[ -x "$rvm_ruby_binary" ]] ; then rvm_ruby_string=$(dirname "$rvm_ruby_binary" | xargs dirname | xargs basename) __rvm_select __rvm_bin_script fi @@ -167,14 +167,14 @@ PATH=$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH ; export PATH exec "$rvm_ruby_binary" "\$@" RubyWrapper ) - rm -f $rvm_path/bin/$rvm_ruby_package_name - echo "$ruby_wrapper" > $rvm_path/bin/$rvm_ruby_package_name + rm -f $rvm_bin_path/$rvm_ruby_package_name + echo "$ruby_wrapper" > $rvm_bin_path/$rvm_ruby_package_name unset ruby_wrapper - chmod +x $rvm_path/bin/$rvm_ruby_package_name + chmod +x $rvm_bin_path/$rvm_ruby_package_name } __rvm_load_defaults() { if [[ ! -s "$rvm_path/system" ]] ; then for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME ; do @@ -230,11 +230,11 @@ for system_config in system_ruby system_gem_path system_user_gem_path ; do $rvm_scripts_path/db "$rvm_config_path/user" "$system_config" "delete" done ; unset system_config variable - rm -f $rvm_path/bin/ruby $rvm_path/bin/gem $rvm_path/bin/rake $rvm_path/bin/irb $rvm_path/bin/default* + rm -f $rvm_bin_path/ruby $rvm_bin_path/gem $rvm_bin_path/rake $rvm_bin_path/irb $rvm_bin_path/default* } __rvm_implode() { while : ; do $rvm_scripts_path/log "warn" "Are you SURE you wish for rvm to implode? This will remove $rvm_path ? (type 'yes' or 'no')" @@ -279,10 +279,11 @@ done < <(svn list http://svn.ruby-lang.org/repos/ruby/tags/ | awk '/^v1_[8|9]/') echo -e "(ruby-)1.8.6(-p383)\n(ruby-)1.8.6-head\n(ruby-)1.8.7(-p248)\n(ruby-)1.8.7-head\n(ruby-)1.9.1(-p243)\n(ruby-)1.9.1(-p376)\n(ruby-)1.9.1-head\n(ruby-)1.9.2-preview1" echo -e "jruby-1.2.0\njruby-1.3.0\njruby-1.3.1\njruby(-1.4.0) # the default\njruby-head" echo -e "rbx(-prc1) # default\nrbx-head" echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head" + echo -e "maglev(-22725)" echo -e "mput(-head) # shyouhei head, the default mput" echo -e "ironruby-0.9.3 # (1.0 RC1)\nironruby-head" if [[ "Darwin" = "$(uname)" ]] ; then echo -e "macruby(-nightly) # the default macruby\nmacruby-head # Build from the macruby git repository" fi @@ -290,15 +291,15 @@ ruby=$(which ruby 2>/dev/null) ; current_ruby="" if [[ ! -z "$ruby" ]] && [[ ! -z "$(echo $ruby | awk '/rvm/')" ]] ; then current_ruby="$(echo $ruby | xargs dirname | xargs dirname | xargs basename 2> /dev/null)" fi - for version in $(\ls $rvm_path/ 2> /dev/null | awk '/[a-z]*-.*/ {print $NF}') ; do + for version in $(\ls $rvm_rubies_path/ 2> /dev/null | awk '/[a-z]*-.*/ {print $NF}') ; do if [[ ! -z "$(echo $version | awk '/^jruby-/')" ]] ; then - string="$($rvm_path/$version/bin/ruby -v | awk '{print $NF}')" + string="$($rvm_rubies_path/$version/bin/ruby -v | awk '{print $NF}')" else - string="[ $(file $rvm_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]" + string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]" fi if [[ "$version" = "$current_ruby" ]] ; then echo -e "=> $(tput setaf 2)$version$(tput sgr0) $string" selected="1" else @@ -307,11 +308,11 @@ done ; unset version if [[ -f "$rvm_path/default" ]] && [[ -s $rvm_path/default ]] ; then version=$(grep 'MY_RUBY_HOME' $rvm_path/default | awk -F"'" '{print $2}' | xargs basename) if [[ ! -z "$version" ]] ; then - string="[ $(file $rvm_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]" + string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | tr "\n" ' ')]" if [[ "$version" = "$current_ruby" ]] ; then echo -e "=> $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string" selected="1" else echo -e " $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string" @@ -491,11 +492,11 @@ done elif [[ ! -z "$rvm_ruby_interpreter" ]] ; then unset rvm_ruby_string rvm_ruby_version __rvm_ruby_do else # all - for full_binary in $rvm_path/*/bin/ruby ; do + for full_binary in $rvm_rubies_path/*/bin/ruby ; do if [[ -x "$full_binary" ]] ; then rvm_ruby_string="$(dirname $full_binary | xargs dirname | xargs basename)" __rvm_ruby_do fi done ; unset full_binary @@ -586,11 +587,11 @@ } __rvm_irbrc() { # Create the irbrc for the currently selected ruby installation. if [[ -d "$rvm_ruby_home" ]] && [[ ! -s "$rvm_ruby_irbrc" ]] ; then - cp $rvm_path/scripts/irbrc $rvm_ruby_irbrc + cp $rvm_scripts_path/irbrc $rvm_ruby_irbrc fi } __rvm_pushpop() { if [[ -z "$1" ]] ; then @@ -600,10 +601,10 @@ fi } __rvm_state() { if [[ -z "$rvm_state" ]] ; then - if [[ -z "$(which ruby 2>/dev/null | awk /$(basename $rvm_path)/)" ]] ; then + if [[ -z "$(which ruby 2>/dev/null | awk /$(basename $rvm_rubies_path)/)" ]] ; then rvm_state=system else rvm_state="$(dirname "$(which ruby 2>/dev/null)" | xargs dirname | xargs basename)" fi else