rvm 0.0.88 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/config/db +1 -1
- data/config/md5 +1 -0
- data/install +4 -0
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +6 -4
- data/scripts/cli +21 -15
- data/scripts/fetch +5 -3
- data/scripts/gems +97 -125
- data/scripts/initialize +11 -1
- data/scripts/install +4 -0
- data/scripts/libraries +65 -37
- data/scripts/manage +13 -10
- data/scripts/md5 +21 -0
- data/scripts/monitor +20 -3
- data/scripts/notes +3 -1
- data/scripts/rvm +1 -1
- data/scripts/rvm-install +4 -0
- data/scripts/selector +6 -1
- data/scripts/update +4 -0
- data/scripts/utility +65 -75
- metadata +3 -2
    
        data/config/db
    CHANGED
    
    | @@ -22,7 +22,7 @@ ree_1.8.7_patch_level=2009.10 | |
| 22 22 | 
             
            rbx_version=1.0.0-rc1
         | 
| 23 23 | 
             
            rbx_patch_level=20091125
         | 
| 24 24 | 
             
            rbx_url=http://asset.rubini.us/rubinius-1.0.0-rc1-20091125.tar.gz
         | 
| 25 | 
            -
            ruby_1.9.1_patch_level= | 
| 25 | 
            +
            ruby_1.9.1_patch_level=376
         | 
| 26 26 | 
             
            ruby_1.9.2_patch_level=preview1
         | 
| 27 27 | 
             
            ruby_1.8.5_patch_level=231
         | 
| 28 28 | 
             
            ruby_1.8.6_patch_level=383
         | 
    
        data/config/md5
    CHANGED
    
    | @@ -17,6 +17,7 @@ ruby-1.8.7-p160.tar.gz=945398f97e2de6dd8ab6df68d10bb1a1 | |
| 17 17 | 
             
            ruby-1.8.7-p174.tar.gz=18dcdfef761a745ac7da45b61776afa5
         | 
| 18 18 | 
             
            ruby-1.9.1-p129.tar.gz=c71f413514ee6341c627be2957023a5c
         | 
| 19 19 | 
             
            ruby-1.9.1-p243.tar.gz=515bfd965814e718c0943abf3dde5494
         | 
| 20 | 
            +
            ruby-1.9.1-p376.tar.gz=ebb20550a11e7f1a2fbd6fdec2a3e0a3
         | 
| 20 21 | 
             
            ruby-1.9.2-preview1.tar.gz=e2b8cdbf300f53472be09699a5837fd1
         | 
| 21 22 | 
             
            ruby-enterprise-1.8.6-20090610.tar.gz=0bf66ee626918464a6eccdd83c99d63a
         | 
| 22 23 | 
             
            ruby-enterprise-1.8.7-2009.10.tar.gz=3727eef7b6b1b2f31db7d091328d966e
         | 
    
        data/install
    CHANGED
    
    | @@ -44,6 +44,10 @@ for dir_name in config scripts examples lib hooks ; do | |
| 44 44 | 
             
              fi
         | 
| 45 45 | 
             
            done ; unset dir_name
         | 
| 46 46 |  | 
| 47 | 
            +
            if [[ ! -s "$rvm_path/config/user" ]] ; then
         | 
| 48 | 
            +
              echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_path/config/user
         | 
| 49 | 
            +
            fi
         | 
| 50 | 
            +
             | 
| 47 51 | 
             
            #
         | 
| 48 52 | 
             
            # Bin Scripts
         | 
| 49 53 | 
             
            #
         | 
    
        data/lib/VERSION.yml
    CHANGED
    
    
    
        data/rvm.gemspec
    CHANGED
    
    | @@ -1,15 +1,15 @@ | |
| 1 1 | 
             
            # Generated by jeweler
         | 
| 2 | 
            -
            # DO NOT EDIT THIS FILE
         | 
| 3 | 
            -
            # Instead, edit Jeweler::Tasks in Rakefile, and run  | 
| 2 | 
            +
            # DO NOT EDIT THIS FILE DIRECTLY
         | 
| 3 | 
            +
            # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
         | 
| 4 4 | 
             
            # -*- encoding: utf-8 -*-
         | 
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{rvm}
         | 
| 8 | 
            -
              s.version = "0.0. | 
| 8 | 
            +
              s.version = "0.0.89"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Wayne E. Seguin"]
         | 
| 12 | 
            -
              s.date = %q{2009-12- | 
| 12 | 
            +
              s.date = %q{2009-12-08}
         | 
| 13 13 | 
             
              s.default_executable = %q{rvm-install}
         | 
| 14 14 | 
             
              s.description = %q{Manages Ruby interpreter installations and switching between them.}
         | 
| 15 15 | 
             
              s.email = %q{wayneeseguin@gmail.com}
         | 
| @@ -52,6 +52,7 @@ Gem::Specification.new do |s| | |
| 52 52 | 
             
                 "scripts/log",
         | 
| 53 53 | 
             
                 "scripts/manage",
         | 
| 54 54 | 
             
                 "scripts/match",
         | 
| 55 | 
            +
                 "scripts/md5",
         | 
| 55 56 | 
             
                 "scripts/monitor",
         | 
| 56 57 | 
             
                 "scripts/notes",
         | 
| 57 58 | 
             
                 "scripts/rvm",
         | 
| @@ -77,3 +78,4 @@ Gem::Specification.new do |s| | |
| 77 78 | 
             
              else
         | 
| 78 79 | 
             
              end
         | 
| 79 80 | 
             
            end
         | 
| 81 | 
            +
             | 
    
        data/scripts/cli
    CHANGED
    
    | @@ -17,13 +17,13 @@ __rvm_parse_args() { | |
| 17 17 | 
             
              while [[ $# -gt 0 ]] ; do
         | 
| 18 18 | 
             
                rvm_token="$1" ; shift
         | 
| 19 19 | 
             
                case "$rvm_token" in
         | 
| 20 | 
            -
                  fetch| | 
| 20 | 
            +
                  fetch|path|info|setup|version|srcdir|list|reset|debug|reload|implode|readline|update|iconv|curl|openssl|ncurses|zlib|readline|monitor|notes)
         | 
| 21 21 | 
             
                    rvm_action=$rvm_token
         | 
| 22 22 | 
             
                  ;;
         | 
| 23 23 |  | 
| 24 24 | 
             
                  use)
         | 
| 25 25 | 
             
                    rvm_action=$rvm_token
         | 
| 26 | 
            -
                    rvm_verbose_flag=1
         | 
| 26 | 
            +
                    export rvm_verbose_flag=1
         | 
| 27 27 | 
             
                    if [[ "ruby" = "$1" ]] ; then shift ; fi
         | 
| 28 28 | 
             
                  ;;
         | 
| 29 29 |  | 
| @@ -33,8 +33,14 @@ __rvm_parse_args() { | |
| 33 33 | 
             
                    rvm_parse_break=1
         | 
| 34 34 | 
             
                  ;;
         | 
| 35 35 |  | 
| 36 | 
            +
                  install|uninstall)
         | 
| 37 | 
            +
                    export ${rvm_token}_flag=1
         | 
| 38 | 
            +
                    rvm_action=$rvm_token
         | 
| 39 | 
            +
                  ;;
         | 
| 40 | 
            +
             | 
| 36 41 | 
             
                  rm|remove)
         | 
| 37 42 | 
             
                    rvm_action="remove"
         | 
| 43 | 
            +
                    export rvm_remove_flag=1
         | 
| 38 44 | 
             
                  ;;
         | 
| 39 45 |  | 
| 40 46 | 
             
                  system|default)
         | 
| @@ -53,23 +59,23 @@ __rvm_parse_args() { | |
| 53 59 | 
             
                  gems|gemset)
         | 
| 54 60 | 
             
                    rvm_action="gems"
         | 
| 55 61 | 
             
                    if [[ "name" = "$1" ]] || [[ "dir" = "$1" ]] || [[ "list" = "$1" ]] || [[ "empty" = "$1" ]] || [[ "delete" = "$1" ]] ; then
         | 
| 56 | 
            -
                       | 
| 62 | 
            +
                      export rvm_${1}_flag=1 ; shift
         | 
| 57 63 | 
             
                    elif [[ "dump" = "$1" ]] || [[ "$1" = "load" ]] ; then
         | 
| 58 | 
            -
                       | 
| 64 | 
            +
                      export rvm_${1}_flag=1 ; shift
         | 
| 59 65 | 
             
                    else
         | 
| 60 | 
            -
                      rvm_use_flag=1 # Default is to use the (named) gem set.
         | 
| 66 | 
            +
                      export rvm_use_flag=1 # Default is to use the (named) gem set.
         | 
| 61 67 | 
             
                    fi
         | 
| 62 68 | 
             
                  ;;
         | 
| 63 69 |  | 
| 64 70 | 
             
                  gemdir)
         | 
| 65 71 | 
             
                    rvm_action=$rvm_token
         | 
| 66 | 
            -
                    if [[ "system" = "$1" ]] ; then rvm_system_flag=1 ; shift ; fi
         | 
| 67 | 
            -
                    if [[ "user" = "$1"  ]]   ; then rvm_user_flag=1  ;  shift ; fi
         | 
| 72 | 
            +
                    if [[ "system" = "$1" ]] ; then export rvm_system_flag=1 ; shift ; fi
         | 
| 73 | 
            +
                    if [[ "user" = "$1"  ]]   ; then export rvm_user_flag=1  ;  shift ; fi
         | 
| 68 74 | 
             
                  ;;
         | 
| 69 75 |  | 
| 70 76 | 
             
                  --load|load|dump|clear)
         | 
| 71 77 | 
             
                    rvm_action="gems"
         | 
| 72 | 
            -
                     | 
| 78 | 
            +
                    export rvm_${rvm_token}_flag=1
         | 
| 73 79 | 
             
                  ;;
         | 
| 74 80 |  | 
| 75 81 | 
             
                  -S|-e)
         | 
| @@ -167,7 +173,7 @@ __rvm_parse_args() { | |
| 167 173 | 
             
                  --head)
         | 
| 168 174 | 
             
                    if [[ -z "$rvm_ruby_string" ]] ; then rvm_ruby_string="head"; else rvm_ruby_string="${rvm_ruby_string}-head" ; fi
         | 
| 169 175 | 
             
                    rvm_ruby_revision="head"
         | 
| 170 | 
            -
                    rvm_head_flag=1
         | 
| 176 | 
            +
                    export rvm_head_flag=1
         | 
| 171 177 | 
             
                    rvm_action="${rvm_action:-use}"
         | 
| 172 178 | 
             
                  ;;
         | 
| 173 179 |  | 
| @@ -185,7 +191,7 @@ __rvm_parse_args() { | |
| 185 191 |  | 
| 186 192 | 
             
                  --bin)
         | 
| 187 193 | 
             
                    if [[ "update" = "$rvm_action" ]] ; then
         | 
| 188 | 
            -
                      rvm_bin_flag=1
         | 
| 194 | 
            +
                      export rvm_bin_flag=1
         | 
| 189 195 | 
             
                    else
         | 
| 190 196 | 
             
                      rvm_bin_path="$1" ; shift
         | 
| 191 197 | 
             
                    fi
         | 
| @@ -243,7 +249,7 @@ __rvm_parse_args() { | |
| 243 249 | 
             
                    rvm_ruby_string="$rvm_token"
         | 
| 244 250 | 
             
                  ;;
         | 
| 245 251 |  | 
| 246 | 
            -
                  --install)            rvm_install_on_use_flag=1           ;;
         | 
| 252 | 
            +
                  --install)            export rvm_install_on_use_flag=1           ;;
         | 
| 247 253 | 
             
                  -h|--help|usage|help) rvm_action=help                     ;;
         | 
| 248 254 | 
             
                  -G|--gems)            rvm_gem_path="$1"          ; shift  ;;
         | 
| 249 255 | 
             
                  --source)             rvm_src_path="$1"          ; shift  ;;
         | 
| @@ -261,7 +267,7 @@ __rvm_parse_args() { | |
| 261 267 | 
             
                  --trace)              export rvm_trace_flag=1    ; set -x ;;
         | 
| 262 268 |  | 
| 263 269 | 
             
                  --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose)
         | 
| 264 | 
            -
                     | 
| 270 | 
            +
                    export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
         | 
| 265 271 | 
             
                    if [[ "--debug" = "$rvm_token" ]] ; then export rvm_debug_flag ; fi
         | 
| 266 272 | 
             
                  ;;
         | 
| 267 273 |  | 
| @@ -366,14 +372,14 @@ rvm() { | |
| 366 372 | 
             
                usage|help)    __rvm_usage               ; result=$?  ;;
         | 
| 367 373 | 
             
                benchmark)     __rvm_benchmark           ; result=$?  ;;
         | 
| 368 374 | 
             
                inspect)       __rvm_inspect             ; result=$?  ;;
         | 
| 369 | 
            -
                gems)           | 
| 375 | 
            +
                gems)          $rvm_scripts_path/gems ${rvm_ruby_file:-$rvm_ruby_args} ; result=$?  ;;
         | 
| 370 376 | 
             
                ruby|gem|rake) __rvm_do                  ; result=$?  ;;
         | 
| 371 377 | 
             
                monitor)
         | 
| 372 378 | 
             
                  export rvm_ruby_version rvm_ruby_string
         | 
| 373 379 | 
             
                  $rvm_scripts_path/monitor ; result=$?
         | 
| 374 380 | 
             
                ;;
         | 
| 375 381 | 
             
                notes)         $rvm_scripts_path/notes   ; result=$?  ;;
         | 
| 376 | 
            -
                reload) | 
| 382 | 
            +
                reload)        rvm_reload_flag=1                      ;;
         | 
| 377 383 | 
             
                fetch|install|uninstall|remove)
         | 
| 378 384 | 
             
                  if [[ ! -z "$rvm_ruby_string" ]] ; then
         | 
| 379 385 | 
             
                    $rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_string"
         | 
| @@ -394,7 +400,7 @@ rvm() { | |
| 394 400 | 
             
                info|debug)
         | 
| 395 401 | 
             
                  __rvm_version
         | 
| 396 402 | 
             
                  __rvm_info
         | 
| 397 | 
            -
                  if [[ "debug" = "$rvm_action" ]] ; then rvm_debug_flag=1 ; __rvm_debug ; fi
         | 
| 403 | 
            +
                  if [[ "debug" = "$rvm_action" ]] ; then export rvm_debug_flag=1 ; __rvm_debug ; fi
         | 
| 398 404 | 
             
                ;;
         | 
| 399 405 |  | 
| 400 406 | 
             
                error)
         | 
    
        data/scripts/fetch
    CHANGED
    
    | @@ -17,20 +17,22 @@ archive=$(basename "$1") ; downlaod=1 | |
| 17 17 | 
             
            (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Fetching $archive"
         | 
| 18 18 |  | 
| 19 19 | 
             
            # Check first if we have the correct archive
         | 
| 20 | 
            -
             | 
| 20 | 
            +
            archive_md5="$($rvm_scripts_path/db "$rvm_config_path/md5" "$archive")"
         | 
| 21 | 
            +
            if [[ -e "$archive" ]] && [[ ! -z "$archive_md5" ]] ; then
         | 
| 21 22 | 
             
              (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Found archive and its md5, testing correctness"
         | 
| 22 | 
            -
              if [[ $( | 
| 23 | 
            +
              if [[ $($rvm_scripts_path/md5 $archive $archive_md5) -gt 0 ]] ; then
         | 
| 23 24 | 
             
                (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Archive is bad, downloading"
         | 
| 24 25 | 
             
                download=1
         | 
| 25 26 | 
             
              else
         | 
| 26 27 | 
             
                (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Archive is good, not downloading"
         | 
| 27 28 | 
             
                download=0
         | 
| 28 29 | 
             
                result=0
         | 
| 29 | 
            -
              fi
         | 
| 30 | 
            +
              fi ; unset archive_md5
         | 
| 30 31 | 
             
            else
         | 
| 31 32 | 
             
              (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "No archive or no MD5, downloading"
         | 
| 32 33 | 
             
              download=1
         | 
| 33 34 | 
             
            fi
         | 
| 35 | 
            +
             | 
| 34 36 | 
             
            if [[ $download -gt 0 ]] ; then
         | 
| 35 37 | 
             
              eval $fetch_command "$1"
         | 
| 36 38 | 
             
              result=$?
         | 
    
        data/scripts/gems
    CHANGED
    
    | @@ -1,42 +1,12 @@ | |
| 1 1 | 
             
            #!/usr/bin/env bash
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 3 | 
            +
            source $rvm_path/scripts/initialize
         | 
| 4 | 
            +
            source $rvm_path/scripts/utility
         | 
| 5 | 
            +
            source $rvm_path/scripts/selector
         | 
| 5 6 |  | 
| 6 | 
            -
             | 
| 7 | 
            -
                if [[ ! -z "$GEM_HOME" ]] ; then
         | 
| 8 | 
            -
                  rvm_gem_set_name=$(echo $GEM_HOME | xargs basename | awk -F'%' '{print $2}')
         | 
| 9 | 
            -
                fi
         | 
| 10 | 
            -
             | 
| 11 | 
            -
                if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
         | 
| 12 | 
            -
                  rvm_gem_set_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F'%' '{print $2}')
         | 
| 13 | 
            -
                fi
         | 
| 7 | 
            +
            if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
         | 
| 14 8 |  | 
| 15 | 
            -
             | 
| 16 | 
            -
                  rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
         | 
| 17 | 
            -
                else
         | 
| 18 | 
            -
                  if [[ ! -z "$rvm_ruby_interpreter" ]] && [[ ! -z "$rvm_ruby_version" ]] && [[ "$rvm_ruby_interpreter" != "system" ]] ; then
         | 
| 19 | 
            -
                    rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version"
         | 
| 20 | 
            -
                  elif [[ -z "$GEM_HOME" ]]  && [[ ! -z "$(which gem 2>/dev/null)" ]] ; then
         | 
| 21 | 
            -
                    rvm_ruby_gem_home=$(gem env gemdir)
         | 
| 22 | 
            -
                  elif [[ ! -z "$GEM_HOME" ]] ; then
         | 
| 23 | 
            -
                    rvm_ruby_gem_home="$GEM_HOME"
         | 
| 24 | 
            -
                  else
         | 
| 25 | 
            -
                    unset rvm_ruby_gem_home
         | 
| 26 | 
            -
                  fi
         | 
| 27 | 
            -
                fi
         | 
| 28 | 
            -
                if [[ -z "$rvm_gem_set_name" ]] ; then unset rvm_gem_set_name ; fi
         | 
| 29 | 
            -
              else
         | 
| 30 | 
            -
                rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
         | 
| 31 | 
            -
              fi
         | 
| 32 | 
            -
            }
         | 
| 33 | 
            -
             | 
| 34 | 
            -
            __rvm_gems_use() {
         | 
| 35 | 
            -
              mkdir -p "$rvm_ruby_gem_home"
         | 
| 36 | 
            -
              GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
         | 
| 37 | 
            -
              GEM_PATH="$GEM_HOME" ; export GEM_PATH
         | 
| 38 | 
            -
              __rvm_use
         | 
| 39 | 
            -
            }
         | 
| 9 | 
            +
            trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
         | 
| 40 10 |  | 
| 41 11 | 
             
            __rvm_gems_name() {
         | 
| 42 12 | 
             
              echo "$rvm_gem_set_name"
         | 
| @@ -170,78 +140,81 @@ __rvm_gems_load() { | |
| 170 140 | 
             
                  else # version
         | 
| 171 141 | 
             
                    gem_file_name="${gem_name/ /}-${gem_version/ /}.gem"
         | 
| 172 142 | 
             
                  fi
         | 
| 173 | 
            -
             | 
| 174 | 
            -
             | 
| 175 | 
            -
             | 
| 176 | 
            -
             | 
| 177 | 
            -
             | 
| 178 | 
            -
             | 
| 179 | 
            -
             | 
| 180 | 
            -
             | 
| 181 | 
            -
             | 
| 182 | 
            -
             | 
| 183 | 
            -
             | 
| 184 | 
            -
             | 
| 185 | 
            -
             | 
| 186 | 
            -
             | 
| 187 | 
            -
             | 
| 188 | 
            -
             | 
| 189 | 
            -
             | 
| 190 | 
            -
             | 
| 191 | 
            -
             | 
| 192 | 
            -
             | 
| 143 | 
            +
                  __rvm_gem_install
         | 
| 144 | 
            +
                done < <(awk '/^[\.\/a-zA-Z]/{print}' "$rvm_file_name")
         | 
| 145 | 
            +
              else
         | 
| 146 | 
            +
                $rvm_scripts_path/log "error" "$rvm_file_name does not exist to load from."
         | 
| 147 | 
            +
              fi
         | 
| 148 | 
            +
            }
         | 
| 149 | 
            +
            __rvm_gem_install() {
         | 
| 150 | 
            +
              #
         | 
| 151 | 
            +
              # Evaluate
         | 
| 152 | 
            +
              #
         | 
| 153 | 
            +
              if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/${gem_file_name}spec" ]] ; then
         | 
| 154 | 
            +
                unset gem
         | 
| 155 | 
            +
                $rvm_scripts_path/log "info" "$($rvm_scripts_path/color "green")$gem_name $gem_version$($rvm_scripts_path/color "none") exists, skipping (--force to re-install)"
         | 
| 156 | 
            +
              else
         | 
| 157 | 
            +
                if [[ -f "$gem" ]] ; then
         | 
| 158 | 
            +
                  cache_file="$gem"
         | 
| 159 | 
            +
                elif [[ -f "$rvm_gem_path/cache/${gem_file_name}" ]] ; then
         | 
| 160 | 
            +
                  cache_file="$rvm_gem_path/cache/${gem_file_name}"
         | 
| 161 | 
            +
                else
         | 
| 162 | 
            +
                  cache_file="${cache_file:-$(\ls ${rvm_gem_path}/*/*/cache/${gem_file_name}* 2> /dev/null | sort | head -n1)}"
         | 
| 163 | 
            +
                  if [[ ! -z "$cache_file" ]] && [[ -f "$cache_file" ]] ; then
         | 
| 164 | 
            +
                    if [[ "$(dirname $cache_file)" != "$rvm_gem_path/cache/" ]] ; then
         | 
| 165 | 
            +
                      cp "$cache_file" "$rvm_gem_path/cache/"
         | 
| 166 | 
            +
                      cache_file="$rvm_gem_path/cache/$(basename $cache_file)"
         | 
| 193 167 | 
             
                    fi
         | 
| 168 | 
            +
                  fi
         | 
| 169 | 
            +
                fi
         | 
| 194 170 |  | 
| 195 | 
            -
             | 
| 196 | 
            -
             | 
| 197 | 
            -
             | 
| 198 | 
            -
             | 
| 199 | 
            -
             | 
| 200 | 
            -
             | 
| 201 | 
            -
             | 
| 202 | 
            -
             | 
| 203 | 
            -
             | 
| 204 | 
            -
             | 
| 205 | 
            -
             | 
| 171 | 
            +
                if [[ -z "$cache_file" ]] ; then
         | 
| 172 | 
            +
                  if [[ -f "$gem_file_name" ]] ; then
         | 
| 173 | 
            +
                    gem="$gem_file_name"
         | 
| 174 | 
            +
                  elif [[ -z "${gem_version/ /}" ]] ; then
         | 
| 175 | 
            +
                    gem="${gem_name/ /}"
         | 
| 176 | 
            +
                  else
         | 
| 177 | 
            +
                    gem="${gem_name/ /} -v $gem_version"
         | 
| 178 | 
            +
                  fi
         | 
| 179 | 
            +
                else # cached
         | 
| 180 | 
            +
                  gem_file_name="$(basename "$cache_file")"
         | 
| 181 | 
            +
                  gem_string="$(echo "$gem_file_name" | sed 's#\.gem$##')"
         | 
| 206 182 |  | 
| 207 | 
            -
             | 
| 208 | 
            -
             | 
| 209 | 
            -
             | 
| 210 | 
            -
             | 
| 211 | 
            -
                        fi
         | 
| 212 | 
            -
                      else
         | 
| 213 | 
            -
                        gem="$cache_file"
         | 
| 214 | 
            -
                      fi
         | 
| 183 | 
            +
                  # TODO: Switch this to use match
         | 
| 184 | 
            +
                  if [[ ! -z "$(echo "$rvm_ruby_gem_list" | awk "/${gem_name/ /} \(.*$gem_version/{print}")" ]] ; then
         | 
| 185 | 
            +
                    if [[ ! -z "$rvm_force_flag" ]] ; then
         | 
| 186 | 
            +
                      gem="$rvm_gem_path/cache/$gem_file_name" # install as a named local gem
         | 
| 215 187 | 
             
                    fi
         | 
| 188 | 
            +
                  else
         | 
| 189 | 
            +
                    gem="$cache_file"
         | 
| 216 190 | 
             
                  fi
         | 
| 191 | 
            +
                fi
         | 
| 192 | 
            +
              fi
         | 
| 217 193 |  | 
| 218 | 
            -
             | 
| 219 | 
            -
             | 
| 220 | 
            -
             | 
| 221 | 
            -
             | 
| 222 | 
            -
             | 
| 223 | 
            -
             | 
| 224 | 
            -
             | 
| 225 | 
            -
             | 
| 226 | 
            -
             | 
| 227 | 
            -
             | 
| 228 | 
            -
             | 
| 229 | 
            -
             | 
| 230 | 
            -
                    fi
         | 
| 231 | 
            -
                    if [[ -f "$gem" ]] ; then command="${command} -l" ; fi
         | 
| 232 | 
            -
                    eval $command > /dev/null 2>&1
         | 
| 233 | 
            -
                    result=$?
         | 
| 234 | 
            -
                    if [[ $result -eq 0 ]] ; then
         | 
| 235 | 
            -
                    $rvm_scripts_path/log "info" "$($rvm_scripts_path/color "green")$gem_name $gem_version$($rvm_scripts_path/color "none") installed."
         | 
| 236 | 
            -
                    else
         | 
| 237 | 
            -
                      $rvm_scripts_path/log "error" "$($rvm_scripts_path/color "red")$gem_name $gem_version$($rvm_scripts_path/color "none") failed to install."
         | 
| 238 | 
            -
                    fi
         | 
| 194 | 
            +
              if [[ ! -z "$gem" ]] ; then
         | 
| 195 | 
            +
                # TODO: Set vars if fourth field is non-empty (means that there are conditional statements to execute in the gem install line.
         | 
| 196 | 
            +
                if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 197 | 
            +
             | 
| 198 | 
            +
                $rvm_scripts_path/log "warn" "$gem_name $gem_version is not installed, installing..."
         | 
| 199 | 
            +
                if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
         | 
| 200 | 
            +
                  command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home' $gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
         | 
| 201 | 
            +
                else
         | 
| 202 | 
            +
                  if [[ ! -z "$rvm_ruby_home" ]] ; then
         | 
| 203 | 
            +
                    command="$gem_prefix $rvm_ruby_home/bin/gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
         | 
| 204 | 
            +
                  else
         | 
| 205 | 
            +
                    command="$gem_prefix gem install --no-rdoc --no-ri -q $gem $gem_postfix $vars"
         | 
| 239 206 | 
             
                  fi
         | 
| 240 | 
            -
             | 
| 241 | 
            -
                 | 
| 242 | 
            -
             | 
| 243 | 
            -
                 | 
| 207 | 
            +
                fi
         | 
| 208 | 
            +
                if [[ -f "$gem" ]] ; then command="${command} -l" ; fi
         | 
| 209 | 
            +
                eval $command > /dev/null 2>&1
         | 
| 210 | 
            +
                result=$?
         | 
| 211 | 
            +
                if [[ $result -eq 0 ]] ; then
         | 
| 212 | 
            +
                $rvm_scripts_path/log "info" "$($rvm_scripts_path/color "green")$gem_name $gem_version$($rvm_scripts_path/color "none") installed."
         | 
| 213 | 
            +
                else
         | 
| 214 | 
            +
                  $rvm_scripts_path/log "error" "$($rvm_scripts_path/color "red")$gem_name $gem_version$($rvm_scripts_path/color "none") failed to install."
         | 
| 215 | 
            +
                fi
         | 
| 244 216 | 
             
              fi
         | 
| 217 | 
            +
              unset gem gem_prefix gem_name gem_version gem_file_name gem_postfix cache_file gem_file_name gem_string
         | 
| 245 218 | 
             
            }
         | 
| 246 219 |  | 
| 247 220 | 
             
            __rvm_gemdir() {
         | 
| @@ -259,32 +232,31 @@ __rvm_gemdir() { | |
| 259 232 | 
             
              fi
         | 
| 260 233 | 
             
            }
         | 
| 261 234 |  | 
| 262 | 
            -
             | 
| 263 | 
            -
              unset GEM_PATH
         | 
| 264 | 
            -
              if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
         | 
| 235 | 
            +
            unset GEM_PATH
         | 
| 265 236 |  | 
| 266 | 
            -
             | 
| 267 | 
            -
                $rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions."
         | 
| 268 | 
            -
                return 1
         | 
| 269 | 
            -
              fi
         | 
| 237 | 
            +
            if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
         | 
| 270 238 |  | 
| 271 | 
            -
             | 
| 272 | 
            -
             | 
| 273 | 
            -
               | 
| 274 | 
            -
             | 
| 275 | 
            -
              elif [[ ! -z "$rvm_dump_flag" ]] ; then
         | 
| 276 | 
            -
                __rvm_gems_dump
         | 
| 277 | 
            -
              elif [[ ! -z "$rvm_delete_flag" ]] ; then
         | 
| 278 | 
            -
                __rvm_gems_delete
         | 
| 279 | 
            -
              elif [[ ! -z "$rvm_name_flag" ]] ; then
         | 
| 280 | 
            -
                __rvm_gems_name
         | 
| 281 | 
            -
              elif [[ ! -z "$rvm_dir_flag" ]] ; then
         | 
| 282 | 
            -
                __rvm_gems_dir
         | 
| 283 | 
            -
              elif [[ ! -z "$rvm_list_flag" ]] ; then
         | 
| 284 | 
            -
                __rvm_gems_list
         | 
| 285 | 
            -
              #elif [[ ! -z "$rvm_use_flag" ]] ; then
         | 
| 286 | 
            -
              else
         | 
| 287 | 
            -
                __rvm_gems_use
         | 
| 288 | 
            -
              fi
         | 
| 289 | 
            -
            }
         | 
| 239 | 
            +
            if [[ -z "$(which gem 2>/dev/null)" ]] ; then
         | 
| 240 | 
            +
              $rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions."
         | 
| 241 | 
            +
              return 1
         | 
| 242 | 
            +
            fi
         | 
| 290 243 |  | 
| 244 | 
            +
            if [[ "$rvm_clear_flag" -eq 1 ]] ; then
         | 
| 245 | 
            +
              __rvm_gems_clear
         | 
| 246 | 
            +
            elif [[ "$rvm_load_flag" -eq 1 ]] ; then
         | 
| 247 | 
            +
              __rvm_gems_load
         | 
| 248 | 
            +
            elif [[ "$rvm_dump_flag" -eq 1 ]] ; then
         | 
| 249 | 
            +
              __rvm_gems_dump
         | 
| 250 | 
            +
            elif [[ "$rvm_delete_flag" -eq 1 ]] ; then
         | 
| 251 | 
            +
              __rvm_gems_delete
         | 
| 252 | 
            +
            elif [[ "$rvm_name_flag" -eq 1 ]] ; then
         | 
| 253 | 
            +
              __rvm_gems_name
         | 
| 254 | 
            +
            elif [[ "$rvm_dir_flag" -eq 1 ]] ; then
         | 
| 255 | 
            +
              __rvm_gems_dir
         | 
| 256 | 
            +
            elif [[ "$rvm_list_flag" -eq 1 ]] ; then
         | 
| 257 | 
            +
              __rvm_gems_list
         | 
| 258 | 
            +
            elif [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 259 | 
            +
              __rvm_gem_install
         | 
| 260 | 
            +
            else
         | 
| 261 | 
            +
              gem $*
         | 
| 262 | 
            +
            fi
         | 
    
        data/scripts/initialize
    CHANGED
    
    | @@ -6,9 +6,19 @@ else | |
| 6 6 | 
             
              rvm_rc_files="$HOME/.bash_profile $HOME/.bashrc $HOME/.zshrc"
         | 
| 7 7 | 
             
            fi
         | 
| 8 8 |  | 
| 9 | 
            +
            if [[ ! -z "$rvm_archflags" ]] ; then rvm_make_flags_flag=1 ; fi
         | 
| 10 | 
            +
             | 
| 9 11 | 
             
            rvm_project_rvmrc="${rvm_project_rvmrc:-1}"
         | 
| 10 12 | 
             
            rvm_project_rvmrc_default="${rvm_project_rvmrc_default:-1}"
         | 
| 11 | 
            -
             | 
| 13 | 
            +
            if [[ -z "$rvm_scripts_path" ]] ; then
         | 
| 14 | 
            +
              if [[ -d "$HOME/scripts" ]] ; then
         | 
| 15 | 
            +
                rvm_scripts_path="$HOME/scripts"
         | 
| 16 | 
            +
              elif [[ -d "/usr/local/rvm/scripts" ]] ; then
         | 
| 17 | 
            +
                rvm_scripts_path="/usr/local/rvm/scripts"
         | 
| 18 | 
            +
              else
         | 
| 19 | 
            +
                rvm_scripts_path="$rvm_path/scripts"
         | 
| 20 | 
            +
              fi
         | 
| 21 | 
            +
            fi
         | 
| 12 22 | 
             
            rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
         | 
| 13 23 | 
             
            rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
         | 
| 14 24 | 
             
            rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
         | 
    
        data/scripts/install
    CHANGED
    
    | @@ -44,6 +44,10 @@ for dir_name in config scripts examples lib hooks ; do | |
| 44 44 | 
             
              fi
         | 
| 45 45 | 
             
            done ; unset dir_name
         | 
| 46 46 |  | 
| 47 | 
            +
            if [[ ! -s "$rvm_path/config/user" ]] ; then
         | 
| 48 | 
            +
              echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_path/config/user
         | 
| 49 | 
            +
            fi
         | 
| 50 | 
            +
             | 
| 47 51 | 
             
            #
         | 
| 48 52 | 
             
            # Bin Scripts
         | 
| 49 53 | 
             
            #
         | 
    
        data/scripts/libraries
    CHANGED
    
    | @@ -4,31 +4,39 @@ | |
| 4 4 | 
             
            # ruby supporting libraries:
         | 
| 5 5 | 
             
            #
         | 
| 6 6 | 
             
            __rvm_readline_install() {
         | 
| 7 | 
            -
              __rvm_make_flags
         | 
| 7 | 
            +
              if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 8 8 | 
             
              __rvm_pushpop $rvm_src_path
         | 
| 9 9 | 
             
              package="readline" ; version="5.2" ; archive_format="tar.gz"
         | 
| 10 10 | 
             
              # TODO: Figure out how to list, grab and apply the patches
         | 
| 11 | 
            -
               | 
| 12 | 
            -
               | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
                 | 
| 18 | 
            -
                 | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 11 | 
            +
              #ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
         | 
| 12 | 
            +
              for version in 5.2 6.0 ; do
         | 
| 13 | 
            +
                $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
         | 
| 14 | 
            +
                $rvm_scripts_path/fetch "ftp://ftp.gnu.org/gnu/readline/$package-$version.$archive_format"
         | 
| 15 | 
            +
                result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
         | 
| 16 | 
            +
                __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
         | 
| 17 | 
            +
                builtin cd "$rvm_src_path/$package-$version"
         | 
| 18 | 
            +
                if [[ "Darwin" = "$(uname)" ]] ; then
         | 
| 19 | 
            +
                  #sdk=$(\ls -t /Developer/SDKs/ | head -n 1)
         | 
| 20 | 
            +
                  #CFLAGS="-isysroot /Developer/SDKs/$sdk -arch i386 -arch x86_64"
         | 
| 21 | 
            +
                  #LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/$sdk -arch i386 -arch x86_64"
         | 
| 22 | 
            +
                  #export CFLAGS LDFLAGS
         | 
| 23 | 
            +
                  __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
         | 
| 24 | 
            +
                else
         | 
| 25 | 
            +
                  __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --disable-dependency-tracking --disable-static --enable-shared" "Configuring $package"
         | 
| 26 | 
            +
                fi
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                if [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 29 | 
            +
                  __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
         | 
| 30 | 
            +
                  __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
         | 
| 31 | 
            +
                elif [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
         | 
| 32 | 
            +
                  __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
         | 
| 33 | 
            +
                fi
         | 
| 34 | 
            +
              done
         | 
| 27 35 | 
             
              __rvm_pushpop
         | 
| 28 36 | 
             
            }
         | 
| 29 37 |  | 
| 30 38 | 
             
            __rvm_iconv_install() {
         | 
| 31 | 
            -
              __rvm_make_flags
         | 
| 39 | 
            +
              if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 32 40 | 
             
              __rvm_pushpop $rvm_src_path
         | 
| 33 41 | 
             
              package="libiconv" ; version=1.13.1 ; archive_format="tar.gz"
         | 
| 34 42 | 
             
              $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
         | 
| @@ -37,13 +45,17 @@ __rvm_iconv_install() { | |
| 37 45 | 
             
              __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
         | 
| 38 46 | 
             
              builtin cd "$rvm_src_path/$package-$version"
         | 
| 39 47 | 
             
              __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
         | 
| 40 | 
            -
               | 
| 41 | 
            -
             | 
| 48 | 
            +
              if [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 49 | 
            +
                __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
         | 
| 50 | 
            +
                __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
         | 
| 51 | 
            +
              elif [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
         | 
| 52 | 
            +
                __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
         | 
| 53 | 
            +
              fi
         | 
| 42 54 | 
             
              __rvm_pushpop
         | 
| 43 55 | 
             
            }
         | 
| 44 56 |  | 
| 45 57 | 
             
            __rvm_curl_install() {
         | 
| 46 | 
            -
              __rvm_make_flags
         | 
| 58 | 
            +
              if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 47 59 | 
             
              __rvm_pushpop $rvm_src_path
         | 
| 48 60 | 
             
              package="curl" ; version=7.19.7 ; archive_format="tar.gz"
         | 
| 49 61 | 
             
              $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
         | 
| @@ -52,18 +64,22 @@ __rvm_curl_install() { | |
| 52 64 | 
             
              __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
         | 
| 53 65 | 
             
              builtin cd "$rvm_src_path/$package-$version"
         | 
| 54 66 | 
             
              __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
         | 
| 55 | 
            -
               | 
| 56 | 
            -
             | 
| 67 | 
            +
              if [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 68 | 
            +
                __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
         | 
| 69 | 
            +
                __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
         | 
| 70 | 
            +
              elif [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
         | 
| 71 | 
            +
                __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
         | 
| 72 | 
            +
              fi
         | 
| 57 73 | 
             
              __rvm_pushpop
         | 
| 58 74 | 
             
            }
         | 
| 59 75 |  | 
| 60 76 | 
             
            __rvm_openssl_install() {
         | 
| 61 | 
            -
              __rvm_make_flags
         | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
             | 
| 77 | 
            +
              if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 78 | 
            +
              if $rvm_scripts_path/match "$rvm_archflags" "x86_64" ; then
         | 
| 79 | 
            +
                openssl_os="os/compiler darwin64-x86_64-cc"
         | 
| 80 | 
            +
              else
         | 
| 81 | 
            +
                openssl_os="os/compiler darwin-i386-cc"
         | 
| 82 | 
            +
              fi
         | 
| 67 83 | 
             
              __rvm_pushpop $rvm_src_path
         | 
| 68 84 | 
             
              package="openssl" ; version="0.9.8k" ; archive_format="tar.gz"
         | 
| 69 85 | 
             
              $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
         | 
| @@ -72,13 +88,17 @@ __rvm_openssl_install() { | |
| 72 88 | 
             
              __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
         | 
| 73 89 | 
             
              builtin cd "$rvm_src_path/$package-$version"
         | 
| 74 90 | 
             
              __rvm_run "$package/config" "./config --prefix=$rvm_path/usr zlib no-asm no-krb5 shared" "Configuring $package."
         | 
| 75 | 
            -
               | 
| 76 | 
            -
             | 
| 91 | 
            +
              if [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 92 | 
            +
                __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
         | 
| 93 | 
            +
                __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
         | 
| 94 | 
            +
              elif [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
         | 
| 95 | 
            +
                __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
         | 
| 96 | 
            +
              fi
         | 
| 77 97 | 
             
              __rvm_pushpop
         | 
| 78 98 | 
             
            }
         | 
| 79 99 |  | 
| 80 100 | 
             
            __rvm_zlib_install() {
         | 
| 81 | 
            -
              __rvm_make_flags
         | 
| 101 | 
            +
              if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 82 102 | 
             
              __rvm_pushpop $rvm_src_path
         | 
| 83 103 | 
             
              package="zlib" ; version="1.2.3" ; archive_format="tar.gz"
         | 
| 84 104 | 
             
              $rvm_scripts_path/log "info" "Retrieving $package-$version.$archive_format"
         | 
| @@ -87,13 +107,17 @@ __rvm_zlib_install() { | |
| 87 107 | 
             
              __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package-$version.$archive_format -C $rvm_src_path" "Extracting $package-$version.$archive_format"
         | 
| 88 108 | 
             
              builtin cd "$rvm_src_path/$package-$version"
         | 
| 89 109 | 
             
              __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr" "Configuring $package."
         | 
| 90 | 
            -
               | 
| 91 | 
            -
             | 
| 110 | 
            +
              if [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 111 | 
            +
                __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
         | 
| 112 | 
            +
                __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
         | 
| 113 | 
            +
              elif [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
         | 
| 114 | 
            +
                __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
         | 
| 115 | 
            +
              fi
         | 
| 92 116 | 
             
              __rvm_pushpop
         | 
| 93 117 | 
             
            }
         | 
| 94 118 |  | 
| 95 119 | 
             
            __rvm_ncurses_install() {
         | 
| 96 | 
            -
              __rvm_make_flags
         | 
| 120 | 
            +
              if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 97 121 | 
             
              __rvm_pushpop $rvm_src_path
         | 
| 98 122 | 
             
              package="ncurses" ; version="5.7" ; archive_format="tar.gz"
         | 
| 99 123 | 
             
              $rvm_scripts_path/log "info" "Retrieving $package"
         | 
| @@ -102,8 +126,12 @@ __rvm_ncurses_install() { | |
| 102 126 | 
             
              __rvm_run "$package/extract" "tar zxf $rvm_archives_path/$package.$archive_format -C $rvm_src_path" "Extracting $package.$archive_format"
         | 
| 103 127 | 
             
              builtin cd "$rvm_src_path/$package-$version"
         | 
| 104 128 | 
             
              __rvm_run "$package/configure" "./configure --prefix=$rvm_path/usr --with-shared --disable-rpath --without-debug --without-ada --enable-safe-sprintf --enable-sigwinch --without-progs" "Configuring $package."
         | 
| 105 | 
            -
               | 
| 106 | 
            -
             | 
| 129 | 
            +
              if [[ "$rvm_install_flag" -eq 1 ]] ; then
         | 
| 130 | 
            +
                __rvm_run "$package/make" "/usr/bin/make $rvm_make_flags" "Compiling $package"
         | 
| 131 | 
            +
                __rvm_run "$package/make.install" "/usr/bin/make install" "Installing $package to $rvm_path/usr"
         | 
| 132 | 
            +
              elif [[ "$rvm_uninstall_flag" -eq 1 ]] || [[ "$rvm_remove_flag" -eq 1 ]] ; then
         | 
| 133 | 
            +
                __rvm_run "$package/make.uninstall" "/usr/bin/make uninstall" "uninstalling $package from $rvm_path/usr"
         | 
| 134 | 
            +
              fi
         | 
| 107 135 | 
             
              __rvm_pushpop
         | 
| 108 136 | 
             
            }
         | 
| 109 137 |  | 
    
        data/scripts/manage
    CHANGED
    
    | @@ -23,6 +23,8 @@ __rvm_install_source() { | |
| 23 23 | 
             
              builtin cd $rvm_ruby_src_path
         | 
| 24 24 | 
             
              if [[ $? -gt 0 ]] ; then result=$? ; $rvm_scripts_path/log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" ; __rvm_pushpop ; return $result ; fi
         | 
| 25 25 |  | 
| 26 | 
            +
              if [[ -d "${rvm_path}/usr/bin" ]] ; then export PATH="${rvm_path}/usr/bin:${PATH}" ; fi
         | 
| 27 | 
            +
             | 
| 26 28 | 
             
              if [[ -z "$rvm_ruby_configure" ]] && [[ ! -s "$rvm_ruby_src_path/configure" ]] ; then
         | 
| 27 29 | 
             
                rvm_autoconf="$(which autoconf 2>/dev/null)"
         | 
| 28 30 | 
             
                if [[ $? -gt 0 ]] ; then $rvm_scripts_path/log "fail" "rvm expects autoconf" ; result=$? ; return $result ; fi
         | 
| @@ -178,7 +180,7 @@ RubyWrapper | |
| 178 180 | 
             
                      result=1
         | 
| 179 181 | 
             
                    else
         | 
| 180 182 | 
             
                      rvm_ruby_repo_url=$rvm_url
         | 
| 181 | 
            -
                      __rvm_make_flags
         | 
| 183 | 
            +
                      if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 182 184 | 
             
                      __rvm_install_source $*
         | 
| 183 185 | 
             
                    fi
         | 
| 184 186 | 
             
                  fi
         | 
| @@ -340,7 +342,7 @@ RubyWrapper | |
| 340 342 | 
             
                ;;
         | 
| 341 343 |  | 
| 342 344 | 
             
                mput|shyouhei)
         | 
| 343 | 
            -
                  __rvm_make_flags
         | 
| 345 | 
            +
                  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 344 346 | 
             
                  unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
         | 
| 345 347 | 
             
                  PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
         | 
| 346 348 | 
             
                  PATH=$rvm_bin_path:$PATH ; export PATH
         | 
| @@ -401,7 +403,7 @@ RubyWrapper | |
| 401 403 | 
             
                ;;
         | 
| 402 404 |  | 
| 403 405 | 
             
                ruby)
         | 
| 404 | 
            -
                  __rvm_make_flags
         | 
| 406 | 
            +
                  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
         | 
| 405 407 | 
             
                  __rvm_install_source $*
         | 
| 406 408 | 
             
                ;;
         | 
| 407 409 |  | 
| @@ -422,22 +424,23 @@ __rvm_fetch_ruby() { | |
| 422 424 | 
             
              if [[ -z "$rvm_head_flag" ]] && [[ -z "$rvm_ruby_tag" ]] && [[ -z "$rvm_ruby_revision" ]] ; then
         | 
| 423 425 | 
             
                rvm_ruby_package_name="${rvm_ruby_package_name:-"$rvm_ruby_string"}"
         | 
| 424 426 | 
             
                rvm_ruby_package_file="${rvm_ruby_package_file:-"$rvm_ruby_package_name"}"
         | 
| 425 | 
            -
                 | 
| 427 | 
            +
                rvm_archive_extension="tar.gz"
         | 
| 428 | 
            +
                if [[ ! -s "$rvm_archives_path/$rvm_ruby_package_file.$rvm_archive_extension" ]] ; then
         | 
| 426 429 | 
             
                  if [[ "ruby" = "$rvm_ruby_interpreter" ]] ; then
         | 
| 427 | 
            -
                    rvm_url="ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_file | 
| 430 | 
            +
                    rvm_url="ftp://ftp.ruby-lang.org/pub/ruby/1.$rvm_major_version/$rvm_ruby_package_file.$rvm_archive_extension"
         | 
| 428 431 | 
             
                  elif [[ "ree" = "$rvm_ruby_interpreter" ]] ; then
         | 
| 429 | 
            -
                    rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_url")/$rvm_ruby_package_file | 
| 432 | 
            +
                    rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_url")/$rvm_ruby_package_file.$rvm_archive_extension"
         | 
| 430 433 | 
             
                  elif [[ "jruby" = "$rvm_ruby_interpreter" ]] ; then
         | 
| 431 | 
            -
                    rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_url")/$rvm_ruby_version/$rvm_ruby_package_file | 
| 434 | 
            +
                    rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_url")/$rvm_ruby_version/$rvm_ruby_package_file.$rvm_archive_extension"
         | 
| 432 435 | 
             
                  else
         | 
| 433 | 
            -
                    rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_url")/$rvm_ruby_package_file | 
| 436 | 
            +
                    rvm_url="$(__rvm_db "${rvm_ruby_interpreter}_url")/$rvm_ruby_package_file.$rvm_archive_extension"
         | 
| 434 437 | 
             
                  fi
         | 
| 435 438 | 
             
                  $rvm_scripts_path/log "info" "Downloading $rvm_ruby_package_file, this may take a while depending on your connection..."
         | 
| 436 439 | 
             
                  $rvm_scripts_path/fetch "$rvm_url"
         | 
| 437 440 | 
             
                  result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
         | 
| 438 | 
            -
                  __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.tar.gz -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
         | 
| 439 | 
            -
                  if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
         | 
| 440 441 | 
             
                fi
         | 
| 442 | 
            +
                __rvm_run "extract" "tar xzf $rvm_archives_path/$rvm_ruby_package_file.$rvm_archive_extension -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
         | 
| 443 | 
            +
                if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
         | 
| 441 444 | 
             
              else
         | 
| 442 445 | 
             
                if [[ ! -z "$(echo $rvm_url | awk '/^git/')" ]] ; then
         | 
| 443 446 | 
             
                  if [[ -d "$rvm_ruby_src_path/.git" ]] ; then
         | 
    
        data/scripts/md5
    ADDED
    
    | @@ -0,0 +1,21 @@ | |
| 1 | 
            +
            #!/usr/bin/env bash
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            file=$1 ; md5=$2
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            if [[ "Linux" = "$(uname)" ]] ; then
         | 
| 8 | 
            +
              command="md5sum"
         | 
| 9 | 
            +
              #md5sum --status -c "$file"
         | 
| 10 | 
            +
            elif [[ "Darwin" = "$(uname)" ]] ; then
         | 
| 11 | 
            +
              #md5 --status -c "$1"
         | 
| 12 | 
            +
              command="md5"
         | 
| 13 | 
            +
            fi
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            file_md5=$($command $file | awk '{print $NF}')
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            if [[ "$file_md5" = "$md5" ]] ; then
         | 
| 18 | 
            +
              exit 0
         | 
| 19 | 
            +
            else
         | 
| 20 | 
            +
              exit 1
         | 
| 21 | 
            +
            fi
         | 
    
        data/scripts/monitor
    CHANGED
    
    | @@ -40,14 +40,16 @@ update_timestamp "test" | |
| 40 40 | 
             
            update_timestamp "spec"
         | 
| 41 41 |  | 
| 42 42 | 
             
            while : ; do
         | 
| 43 | 
            -
              changed_test_files=() ; changed_spec_files=()
         | 
| 43 | 
            +
              changed_test_files=() ; changed_spec_files=() ; changed_code_files=()
         | 
| 44 | 
            +
             | 
| 45 | 
            +
              for file in lib/**/*.rb lib/*.rb app/**/*.rb app/*.rb ; do
         | 
| 46 | 
            +
                if [[ -f "$file" ]] ; then push_if_timestamp_changed $file "code" ; fi
         | 
| 47 | 
            +
              done
         | 
| 44 48 |  | 
| 45 49 | 
             
              for framework in test spec ; do
         | 
| 46 50 |  | 
| 47 51 | 
             
                if [[ -d "$framework/" ]] ; then
         | 
| 48 52 |  | 
| 49 | 
            -
                  #files=($(\ls ${framework}/**/*_${framework}.rb) $(ls ${framework}/*_${framework}.rb))
         | 
| 50 | 
            -
                  #for file in "${files[@]}" ; do
         | 
| 51 53 | 
             
                  for file in ${framework}/**/*_${framework}.rb ${framework}/*_${framework}.rb ; do
         | 
| 52 54 | 
             
                    if [[ -f "$file" ]] ; then
         | 
| 53 55 | 
             
                      push_if_timestamp_changed $file $framework
         | 
| @@ -69,6 +71,21 @@ while : ; do | |
| 69 71 | 
             
                    fi
         | 
| 70 72 | 
             
                    update=1
         | 
| 71 73 | 
             
                  fi
         | 
| 74 | 
            +
             | 
| 75 | 
            +
                  if [[ "$(array_length "changed_code_files")" -gt 0 ]] ; then
         | 
| 76 | 
            +
                    rvm_ruby_version=$original_ruby_version
         | 
| 77 | 
            +
                    rvm_ruby_string=$original_ruby_string
         | 
| 78 | 
            +
                    if [[ "spec" = "$framework" ]] ; then
         | 
| 79 | 
            +
                      rvm_action="spec"
         | 
| 80 | 
            +
                      rvm_ruby_args="spec/"
         | 
| 81 | 
            +
                      __rvm_do
         | 
| 82 | 
            +
                    elif [[ "test" = "$framework" ]] ; then
         | 
| 83 | 
            +
                      rvm_action="rake"
         | 
| 84 | 
            +
                      rvm_ruby_args="test"
         | 
| 85 | 
            +
                      __rvm_do
         | 
| 86 | 
            +
                    fi
         | 
| 87 | 
            +
                    update=1
         | 
| 88 | 
            +
                  fi
         | 
| 72 89 | 
             
                fi
         | 
| 73 90 |  | 
| 74 91 | 
             
                if [[ "$update" -eq 1 ]] ; then
         | 
    
        data/scripts/notes
    CHANGED
    
    | @@ -6,6 +6,8 @@ item="$(tput setaf 2)* $(tput sgr0)" | |
| 6 6 |  | 
| 7 7 | 
             
            echo -e "\n$(tput setaf 2)rvm notes for $system $(tput sgr0)\n"
         | 
| 8 8 |  | 
| 9 | 
            +
            echo -e "    $item curl is required, be sure it is installed.\n"
         | 
| 10 | 
            +
             | 
| 9 11 | 
             
            if [[ "Linux" = "$system" ]] ; then
         | 
| 10 12 | 
             
              rvm_apt_get_binary="$(which aptitude 2> /dev/null)"
         | 
| 11 13 | 
             
              rvm_emerge_binary="$(which emerge 2> /dev/null)"
         | 
| @@ -24,7 +26,7 @@ if [[ "Linux" = "$system" ]] ; then | |
| 24 26 |  | 
| 25 27 | 
             
              elif [[ ! -z "$rvm_pacman_binary" ]] ; then
         | 
| 26 28 | 
             
                echo -e "    $item For JRuby (if you wish to use it) you will need:"
         | 
| 27 | 
            -
                echo -e "       $ pacman -Sy jdk jre"
         | 
| 29 | 
            +
                echo -e "       $ pacman -Sy jdk jre curl"
         | 
| 28 30 |  | 
| 29 31 | 
             
              elif [[ ! -z "$rvm_yum_binary" ]] ; then
         | 
| 30 32 | 
             
                echo -e "    $item For ree (if you wish to use it) you will need:"
         | 
    
        data/scripts/rvm
    CHANGED
    
    | @@ -26,7 +26,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then | |
| 26 26 | 
             
              source $rvm_path/scripts/utility
         | 
| 27 27 | 
             
              source $rvm_path/scripts/selector
         | 
| 28 28 | 
             
              source $rvm_path/scripts/cli
         | 
| 29 | 
            -
              source $rvm_path/scripts/gems
         | 
| 29 | 
            +
              #source $rvm_path/scripts/gems
         | 
| 30 30 | 
             
              source $rvm_path/scripts/libraries
         | 
| 31 31 | 
             
              source $rvm_path/scripts/cd
         | 
| 32 32 |  | 
    
        data/scripts/rvm-install
    CHANGED
    
    | @@ -44,6 +44,10 @@ for dir_name in config scripts examples lib hooks ; do | |
| 44 44 | 
             
              fi
         | 
| 45 45 | 
             
            done ; unset dir_name
         | 
| 46 46 |  | 
| 47 | 
            +
            if [[ ! -s "$rvm_path/config/user" ]] ; then
         | 
| 48 | 
            +
              echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_path/config/user
         | 
| 49 | 
            +
            fi
         | 
| 50 | 
            +
             | 
| 47 51 | 
             
            #
         | 
| 48 52 | 
             
            # Bin Scripts
         | 
| 49 53 | 
             
            #
         | 
    
        data/scripts/selector
    CHANGED
    
    | @@ -349,9 +349,12 @@ __rvm_ruby_string() { | |
| 349 349 | 
             
                  rvm_ruby_tag="$string"
         | 
| 350 350 | 
             
                elif $rvm_scripts_path/match "$string" "^m[0-9]" ; then
         | 
| 351 351 | 
             
                  rvm_ruby_mode="$string"
         | 
| 352 | 
            -
                elif $rvm_scripts_path/match "$string" "^h[a- | 
| 352 | 
            +
                elif $rvm_scripts_path/match "$string" "^h[a-z0-9]" ; then
         | 
| 353 353 | 
             
                  unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag
         | 
| 354 354 | 
             
                  rvm_ruby_patch="$string"
         | 
| 355 | 
            +
                elif $rvm_scripts_path/match "$string" "^u[a-z0-9]" ; then
         | 
| 356 | 
            +
                  unset rvm_ruby_patch_level rvm_ruby_revision rvm_ruby_tag rvm_ruby_patch
         | 
| 357 | 
            +
                  rvm_ruby_user_tag="$string"
         | 
| 355 358 | 
             
                elif $rvm_scripts_path/match "$string" "^[a-z][a-z]" ; then
         | 
| 356 359 | 
             
                  rvm_ruby_interpreter="$string"
         | 
| 357 360 | 
             
                else
         | 
| @@ -394,6 +397,8 @@ __rvm_ruby_string() { | |
| 394 397 | 
             
                rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch}"
         | 
| 395 398 | 
             
              elif [[ ! -z "$rvm_ruby_patch_level" ]]  ; then
         | 
| 396 399 | 
             
                rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_patch_level}"
         | 
| 400 | 
            +
              elif [[ ! -z "$rvm_ruby_user_tag" ]]  ; then
         | 
| 401 | 
            +
                rvm_ruby_string="${rvm_ruby_string}-${rvm_ruby_user_tag}"
         | 
| 397 402 | 
             
              else
         | 
| 398 403 | 
             
                patch_level="$(__rvm_db "${rvm_ruby_interpreter}_${rvm_ruby_version}_patch_level")"
         | 
| 399 404 | 
             
                if [[ ! -z "$patch_level" ]] ; then rvm_ruby_patch_level="p${patch_level}" ; fi
         | 
    
        data/scripts/update
    CHANGED
    
    | @@ -44,6 +44,10 @@ for dir_name in config scripts examples lib hooks ; do | |
| 44 44 | 
             
              fi
         | 
| 45 45 | 
             
            done ; unset dir_name
         | 
| 46 46 |  | 
| 47 | 
            +
            if [[ ! -s "$rvm_path/config/user" ]] ; then
         | 
| 48 | 
            +
              echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_path/config/user
         | 
| 49 | 
            +
            fi
         | 
| 50 | 
            +
             | 
| 47 51 | 
             
            #
         | 
| 48 52 | 
             
            # Bin Scripts
         | 
| 49 53 | 
             
            #
         | 
    
        data/scripts/utility
    CHANGED
    
    | @@ -140,11 +140,10 @@ __rvm_unset_ruby_variables() { | |
| 140 140 |  | 
| 141 141 | 
             
            __rvm_load_rvmrc() {
         | 
| 142 142 | 
             
              if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
         | 
| 143 | 
            -
              if [[ -f $HOME/.rvmrc ]] ; then source $HOME/.rvmrc ; fi
         | 
| 143 | 
            +
              if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
         | 
| 144 144 | 
             
            }
         | 
| 145 145 |  | 
| 146 146 | 
             
            __rvm_bin_scripts() {
         | 
| 147 | 
            -
              # for rvm_ruby_binary in $(\ls $rvm_path/*/bin/ruby 2> /dev/null) ; do
         | 
| 148 147 | 
             
              for rvm_ruby_binary in $rvm_path/*/bin/ruby ; do
         | 
| 149 148 | 
             
              if [[ -x "$rvm_ruby_binary" ]] ; then
         | 
| 150 149 | 
             
                rvm_ruby_string=$(dirname "$rvm_ruby_binary" | xargs dirname | xargs basename)
         | 
| @@ -272,7 +271,7 @@ __rvm_list() { | |
| 272 271 | 
             
                  echo "${prefix}-t${tag/\//}"
         | 
| 273 272 | 
             
                  unset prefix tag
         | 
| 274 273 | 
             
                done < <(svn list http://svn.ruby-lang.org/repos/ruby/tags/ | awk '/^v1_[8|9]/')
         | 
| 275 | 
            -
                echo -e "(ruby-)1.8.6(-p383)\n(ruby-)1.8.6-head\n(ruby-)1.8.7(-p174)\n(ruby-)1.8.7-head\n(ruby-)1.9.1(-p243)\n(ruby-)1.9.1-head\n(ruby-)1.9.2-preview1"
         | 
| 274 | 
            +
                echo -e "(ruby-)1.8.6(-p383)\n(ruby-)1.8.6-head\n(ruby-)1.8.7(-p174)\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"
         | 
| 276 275 | 
             
                echo -e "jruby-1.2.0\njruby-1.3.0\njruby-1.3.1\njruby(-1.4.0) # the default\njruby-head"
         | 
| 277 276 | 
             
                echo -e "rbx(-head) # rubinius head, the default rbx \nrbx(-head) --jit (rubinius head with LLVM enabled)"
         | 
| 278 277 | 
             
                echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
         | 
| @@ -286,92 +285,40 @@ __rvm_list() { | |
| 286 285 | 
             
                  current_ruby="$(echo $ruby | xargs dirname | xargs dirname | xargs basename 2> /dev/null)"
         | 
| 287 286 | 
             
                fi
         | 
| 288 287 |  | 
| 289 | 
            -
                for version in $(\ls  | 
| 290 | 
            -
                   | 
| 291 | 
            -
             | 
| 292 | 
            -
                    echo -e "=> $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 293 | 
            -
                    selected="1"
         | 
| 288 | 
            +
                for version in $(\ls $rvm_path/ 2> /dev/null | awk '/[a-z]*-.*/ {print $NF}') ; do
         | 
| 289 | 
            +
                  if [[ ! -z "$(echo $version | awk '/^jruby-/')" ]] ; then
         | 
| 290 | 
            +
                    string="$($version -v | awk '{print $NF}')"
         | 
| 294 291 | 
             
                  else
         | 
| 295 | 
            -
                     | 
| 292 | 
            +
                    string="[$(file $rvm_path/$version/bin/ruby | awk -F: '{print $2}' | awk '{print $NF}')]"
         | 
| 296 293 | 
             
                  fi
         | 
| 297 | 
            -
                done ; unset version
         | 
| 298 | 
            -
             | 
| 299 | 
            -
                for version in $(\ls $rvm_path/ 2> /dev/null | awk '/ree-.*/ { print $NF }') ; do
         | 
| 300 | 
            -
                  string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
         | 
| 301 294 | 
             
                  if [[ "$version" = "$current_ruby" ]] ; then
         | 
| 302 | 
            -
                    echo -e "=> $(tput setaf 2)$version$(tput sgr0) | 
| 295 | 
            +
                    echo -e "=> $(tput setaf 2)$version$(tput sgr0) $string"
         | 
| 303 296 | 
             
                    selected="1"
         | 
| 304 297 | 
             
                  else
         | 
| 305 | 
            -
                    echo -e "   $(tput setaf 2)$version$(tput sgr0) | 
| 298 | 
            +
                    echo -e "   $(tput setaf 2)$version$(tput sgr0) $string"
         | 
| 306 299 | 
             
                  fi
         | 
| 307 300 | 
             
                done ; unset version
         | 
| 308 301 |  | 
| 309 | 
            -
                for version in $(\ls $rvm_path/ 2> /dev/null | awk '/mput-.*/ { print $NF }') ; do
         | 
| 310 | 
            -
                  string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
         | 
| 311 | 
            -
                  if [[ "$version" = "$current_ruby" ]] ; then
         | 
| 312 | 
            -
                    echo -e "=> $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 313 | 
            -
                    selected="1"
         | 
| 314 | 
            -
                  else
         | 
| 315 | 
            -
                    echo -e "   $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 316 | 
            -
                  fi
         | 
| 317 | 
            -
                done ; unset version
         | 
| 318 | 
            -
             | 
| 319 | 
            -
                for version in $(\ls $rvm_path/ 2> /dev/null | awk '/jruby-.*/ { print $NF }') ; do
         | 
| 320 | 
            -
                  string=$($rvm_path/$version/bin/ruby -v)
         | 
| 321 | 
            -
                  if [[ "$version" = "$current_ruby" ]] ; then
         | 
| 322 | 
            -
                    echo -e "=> $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 323 | 
            -
                    selected="1"
         | 
| 324 | 
            -
                  else
         | 
| 325 | 
            -
                    echo -e "   $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 326 | 
            -
                  fi
         | 
| 327 | 
            -
                done ; unset version
         | 
| 328 | 
            -
             | 
| 329 | 
            -
                # for version in $(\ls $rvm_path/ 2> /dev/null | awk '/rbx-.*/ { print $NF }') ; do
         | 
| 330 | 
            -
                for version in "rbx-head" ; do
         | 
| 331 | 
            -
                  if [[ -f "$rvm_path/$version/bin/ruby" ]] ; then
         | 
| 332 | 
            -
                    string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
         | 
| 333 | 
            -
                    if [[ "$version" = "$current_ruby" ]] ; then
         | 
| 334 | 
            -
                      echo -e "=> $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 335 | 
            -
                      selected="1"
         | 
| 336 | 
            -
                    else
         | 
| 337 | 
            -
                      echo -e "   $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 338 | 
            -
                    fi
         | 
| 339 | 
            -
                  fi
         | 
| 340 | 
            -
                done ; unset version
         | 
| 341 | 
            -
             | 
| 342 | 
            -
             | 
| 343 | 
            -
                if [[ "Darwin" = "$(uname)" ]] ; then
         | 
| 344 | 
            -
                  for version in $(\ls $rvm_path/ 2> /dev/null | awk '/macruby-.*/ { print $NF }') ; do
         | 
| 345 | 
            -
                    string="$($rvm_path/$version/bin/ruby -v | tr "\n" ' ' )"
         | 
| 346 | 
            -
                    if [[ "$version" = "$current_ruby" ]] ; then
         | 
| 347 | 
            -
                      echo -e "=> $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 348 | 
            -
                      selected="1"
         | 
| 349 | 
            -
                    else
         | 
| 350 | 
            -
                      echo -e "   $(tput setaf 2)$version$(tput sgr0)  ( ruby -v # => $string) )"
         | 
| 351 | 
            -
                    fi
         | 
| 352 | 
            -
                  done ; unset version
         | 
| 353 | 
            -
                fi
         | 
| 354 | 
            -
             | 
| 355 302 | 
             
                if [[ -f "$rvm_path/default" ]] && [[ -s $rvm_path/default ]] ; then
         | 
| 356 303 | 
             
                  version=$(grep '^MY_RUBY_HOME' $rvm_path/default | awk -F"'" '{print $2}' | xargs basename)
         | 
| 357 304 | 
             
                  if [[ ! -z "$version" ]] ; then
         | 
| 358 | 
            -
                    string=$($rvm_path/$version/bin/ruby | 
| 305 | 
            +
                    string=$(file $rvm_path/$version/bin/ruby)
         | 
| 359 306 | 
             
                    if [[ "$version" = "$current_ruby" ]] ; then
         | 
| 360 | 
            -
                      echo -e "=> $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) | 
| 307 | 
            +
                      echo -e "=> $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string"
         | 
| 361 308 | 
             
                      selected="1"
         | 
| 362 309 | 
             
                    else
         | 
| 363 | 
            -
                      echo -e "   $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) | 
| 310 | 
            +
                      echo -e "   $(tput setaf 3)(default)$(tput sgr0) $(tput setaf 2)$version$(tput sgr0) $string"
         | 
| 364 311 | 
             
                    fi
         | 
| 365 312 | 
             
                  fi ; unset version
         | 
| 366 313 | 
             
                fi
         | 
| 367 314 |  | 
| 368 315 | 
             
                system_ruby="$(rvm system ; which ruby 2>/dev/null)"
         | 
| 369 316 | 
             
                if [[ ! -z "$system_ruby" ]] ; then
         | 
| 370 | 
            -
                  system_version=$($ | 
| 317 | 
            +
                  system_version=$(file $(which ruby) | awk -F: '{print $2}' | grep 8 | awk '{print $NF}' | tr "\n" ' ')
         | 
| 371 318 | 
             
                  if [[ ! -z "$(which ruby 2>/dev/null)" ]] && [[ "$($(which ruby 2>/dev/null) -v)" = "$system_version" ]] ; then
         | 
| 372 | 
            -
                    echo -e "=> $(tput setaf 2)system$(tput sgr0)  | 
| 319 | 
            +
                    echo -e "=> $(tput setaf 2)system$(tput sgr0) [$system_version]\n"
         | 
| 373 320 | 
             
                  else
         | 
| 374 | 
            -
                    echo -e "   $(tput setaf 2)system$(tput sgr0)  | 
| 321 | 
            +
                    echo -e "   $(tput setaf 2)system$(tput sgr0) [$system_version]\n"
         | 
| 375 322 | 
             
                  fi
         | 
| 376 323 | 
             
                else
         | 
| 377 324 | 
             
                  $rvm_scripts_path/log "info" "No system ruby found."
         | 
| @@ -419,7 +366,12 @@ __rvm_update_rvm() { | |
| 419 366 | 
             
                fi
         | 
| 420 367 | 
             
              else
         | 
| 421 368 | 
             
                # TODO: rvm_install_path:
         | 
| 422 | 
            -
                 | 
| 369 | 
            +
                if [ $(gem list rvm --installed) = 'true' ]; then
         | 
| 370 | 
            +
                    gem update rvm --no-rdoc --no-ri --quiet
         | 
| 371 | 
            +
                else
         | 
| 372 | 
            +
                    gem install rvm --no-rdoc --no-ri --quiet
         | 
| 373 | 
            +
                fi
         | 
| 374 | 
            +
                builtin cd "$(rvm system ; gem env | grep "\- $HOME" | awk '{print $NF}' | head -n 1)/gems/rvm-$(gem list rvm | sed 's/.*(//' | sed 's/).*//' | awk -F',' '{print $1 ; exit}')" && ./install
         | 
| 423 375 | 
             
              fi
         | 
| 424 376 | 
             
              __rvm_pushpop
         | 
| 425 377 | 
             
              __rvm_hook "after_update"
         | 
| @@ -470,7 +422,7 @@ __rvm_ruby_do() { | |
| 470 422 |  | 
| 471 423 | 
             
              load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
         | 
| 472 424 | 
             
              # TODO: the else case below should be run if $rvm_ruby_args =~ /\.rb$/
         | 
| 473 | 
            -
              if [[ "ruby" = "$binary" ]] && [[ "$rvm_benchmark_flag" -ne 1 ]] ; then
         | 
| 425 | 
            +
              if [[ "ruby" = "$(basename $binary)" ]] && [[ "$rvm_benchmark_flag" -ne 1 ]] ; then
         | 
| 474 426 | 
             
                if $rvm_scripts_path/match "$rvm_ruby_args" "\.rb$" ; then
         | 
| 475 427 | 
             
                  if [[ -z "$prefix" ]] ; then prefix="-S" ; fi
         | 
| 476 428 | 
             
                  if ! $rvm_scripts_path/match "$rvm_ruby_args" "$prefix" ; then
         | 
| @@ -478,8 +430,10 @@ __rvm_ruby_do() { | |
| 478 430 | 
             
                  fi
         | 
| 479 431 | 
             
                fi
         | 
| 480 432 | 
             
                rvm_command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path $rvm_ruby_args"
         | 
| 481 | 
            -
              elif [[ "gem" = "$binary" ]] && match "$rvm_ruby_args" '^install' ; then
         | 
| 482 | 
            -
                 | 
| 433 | 
            +
              elif [[ "gem" = "$(basename $binary)" ]] && $rvm_scripts_path/match "$rvm_ruby_args" '^install' ; then
         | 
| 434 | 
            +
                #__rvm_gem_install
         | 
| 435 | 
            +
                #$rvm_scripts_path/gem install $rvm_ruby_args
         | 
| 436 | 
            +
                rvm_command="$rvm_scripts_path/gems $rvm_ruby_mode $rvm_ruby_args --no-rdoc --no-ri"
         | 
| 483 437 | 
             
              else
         | 
| 484 438 | 
             
                rvm_command="$binary $rvm_ruby_mode $rvm_ruby_args"
         | 
| 485 439 | 
             
              fi
         | 
| @@ -520,13 +474,12 @@ __rvm_do() { | |
| 520 474 | 
             
                  unset rvm_ruby_string rvm_ruby_version
         | 
| 521 475 | 
             
                  __rvm_ruby_do
         | 
| 522 476 | 
             
              else # all
         | 
| 523 | 
            -
                 | 
| 524 | 
            -
                for full_binary in ${rubies[@]} ; do
         | 
| 477 | 
            +
                for full_binary in $rvm_path/*/bin/ruby ; do
         | 
| 525 478 | 
             
                  if [[ -x "$full_binary" ]] ; then
         | 
| 526 479 | 
             
                    rvm_ruby_string="$(dirname $full_binary | xargs dirname | xargs basename)"
         | 
| 527 480 | 
             
                    __rvm_ruby_do
         | 
| 528 481 | 
             
                  fi
         | 
| 529 | 
            -
                done ; unset full_binary | 
| 482 | 
            +
                done ; unset full_binary
         | 
| 530 483 | 
             
              fi
         | 
| 531 484 |  | 
| 532 485 | 
             
              if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
         | 
| @@ -653,7 +606,6 @@ __rvm_inspect() { | |
| 653 606 | 
             
            }
         | 
| 654 607 |  | 
| 655 608 | 
             
            __rvm_make_flags() {
         | 
| 656 | 
            -
              PATH=${rvm_path}/usr/bin:$PATH ; export PATH
         | 
| 657 609 | 
             
              # This is only an issue with Darwin :/
         | 
| 658 610 | 
             
              if [[ "Darwin" = "$(uname)" ]] ; then
         | 
| 659 611 | 
             
                # ls /usr/lib/gcc/x86_64-apple-darwin10
         | 
| @@ -697,3 +649,41 @@ __rvm_hook() { | |
| 697 649 | 
             
              fi
         | 
| 698 650 | 
             
            }
         | 
| 699 651 |  | 
| 652 | 
            +
            __rvm_gems_select() {
         | 
| 653 | 
            +
              if [[ -z "$(which gem 2>/dev/null)" ]] ; then return 0 ; fi
         | 
| 654 | 
            +
             | 
| 655 | 
            +
              if [[ -z "$rvm_gem_set_name" ]] ; then
         | 
| 656 | 
            +
                if [[ ! -z "$GEM_HOME" ]] ; then
         | 
| 657 | 
            +
                  rvm_gem_set_name=$(echo $GEM_HOME | xargs basename | awk -F'%' '{print $2}')
         | 
| 658 | 
            +
                fi
         | 
| 659 | 
            +
             | 
| 660 | 
            +
                if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
         | 
| 661 | 
            +
                  rvm_gem_set_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F'%' '{print $2}')
         | 
| 662 | 
            +
                fi
         | 
| 663 | 
            +
             | 
| 664 | 
            +
                if [[ ! -z "$rvm_gem_set_name" ]] && ! $rvm_scripts_path/match "$rvm_gem_set_name" "^[0-9]\.[0-9]" ; then
         | 
| 665 | 
            +
                  rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
         | 
| 666 | 
            +
                else
         | 
| 667 | 
            +
                  if [[ ! -z "$rvm_ruby_interpreter" ]] && [[ ! -z "$rvm_ruby_version" ]] && [[ "$rvm_ruby_interpreter" != "system" ]] ; then
         | 
| 668 | 
            +
                    rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version"
         | 
| 669 | 
            +
                  elif [[ -z "$GEM_HOME" ]]  && [[ ! -z "$(which gem 2>/dev/null)" ]] ; then
         | 
| 670 | 
            +
                    rvm_ruby_gem_home=$(gem env gemdir)
         | 
| 671 | 
            +
                  elif [[ ! -z "$GEM_HOME" ]] ; then
         | 
| 672 | 
            +
                    rvm_ruby_gem_home="$GEM_HOME"
         | 
| 673 | 
            +
                  else
         | 
| 674 | 
            +
                    unset rvm_ruby_gem_home
         | 
| 675 | 
            +
                  fi
         | 
| 676 | 
            +
                fi
         | 
| 677 | 
            +
                if [[ -z "$rvm_gem_set_name" ]] ; then unset rvm_gem_set_name ; fi
         | 
| 678 | 
            +
              else
         | 
| 679 | 
            +
                rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name"
         | 
| 680 | 
            +
              fi
         | 
| 681 | 
            +
            }
         | 
| 682 | 
            +
             | 
| 683 | 
            +
            __rvm_gems_use() {
         | 
| 684 | 
            +
              mkdir -p "$rvm_ruby_gem_home"
         | 
| 685 | 
            +
              GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
         | 
| 686 | 
            +
              GEM_PATH="$GEM_HOME" ; export GEM_PATH
         | 
| 687 | 
            +
              __rvm_use
         | 
| 688 | 
            +
            }
         | 
| 689 | 
            +
             | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: rvm
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.89
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Wayne E. Seguin
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009-12- | 
| 12 | 
            +
            date: 2009-12-08 00:00:00 -05:00
         | 
| 13 13 | 
             
            default_executable: rvm-install
         | 
| 14 14 | 
             
            dependencies: []
         | 
| 15 15 |  | 
| @@ -56,6 +56,7 @@ files: | |
| 56 56 | 
             
            - scripts/log
         | 
| 57 57 | 
             
            - scripts/manage
         | 
| 58 58 | 
             
            - scripts/match
         | 
| 59 | 
            +
            - scripts/md5
         | 
| 59 60 | 
             
            - scripts/monitor
         | 
| 60 61 | 
             
            - scripts/notes
         | 
| 61 62 | 
             
            - scripts/rvm
         |