scripts/rvm-utility in rvm-0.0.35 vs scripts/rvm-utility in rvm-0.0.36

- old
+ new

@@ -2,12 +2,12 @@ function __rvm_meta { rvm_meta_author="Wayne E. Seguin" rvm_meta_author_email="wayneeseguin@gmail.com" rvm_meta_website="http://rvm.beginrescueend.com/" - rvm_meta_version="0.0.35" - rvm_meta_updated="2009.09.05" + rvm_meta_version="0.0.36" + rvm_meta_updated="2009.09.06" } function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; } function __rvm_usage { @@ -167,18 +167,20 @@ function __rvm_gi { gem install -q --no-rdoc --no-ri $* ; } function __rvm_run { log_file_name="$1" ; shift command="$*" + mkdir -p $rvm_ruby_log_path if [ $rvm_debug ] ; then __rvm_log "debug" "Executing: $command" ; fi + touch $rvm_ruby_log_path/$log_file_name.log $rvm_ruby_log_path/$log_file_name.error.log # for zsh :( eval "nice -n $rvm_niceness $command" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log if [ $? -gt 0 ] ; then __rvm_log "error" "There was an error, please check $rvm_ruby_log_path/$log_file_name.error.log" ; popd 2> /dev/null ; return 1 ; fi unset log_file command } function __rvm_cleanup-variables { - unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message IRBRC rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force rvm_set_prompt rvm_all rvm_re_configure + unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force rvm_set_prompt rvm_all rvm_re_configure } # TODO: root user loadng of /etc/rvmrc function __rvm_load-rvmrc { if [ -s ~/.rvmrc ] ; then source ~/.rvmrc ; fi @@ -189,11 +191,11 @@ ruby_wrapper=$(cat <<-RubyWrapper #!/bin/bash GEM_HOME=$rvm_gem_home ; export GEM_HOME MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME -PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:$rvm_default_path ; export PATH +PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:\$PATH ; export PATH exec "$rvm_ruby_binary" "\$@" RubyWrapper ) @@ -273,10 +275,14 @@ rm -f $rvm_path/default* rm -f $rvm_path/current __rvm_select "system" + for default in default_ps1 default_path default_system_ruby default_system_gem_path default_user_gem_path ; do + __rvm_db "$default" "delete" + done ; unset default variable + } function __rvm_implode { while : ; do __rvm_log "warn" "Are you SURE you wish for rvm to implode? This will remove $rvm_path ? (type 'yes' or 'no')" @@ -355,11 +361,11 @@ if [ "$key" = "unset" -o "$key" = "delete" ] ; then sed -i# "s/^$2=.*$//" $rvm_hash_file else value="$*" if [ -z "$value" ] ; then # get - grep "^$key=" $rvm_hash_file | awk -F'=' '{print $2}' + grep "^$key=" $rvm_hash_file | head -n 1 | awk -F'=' '{print $2}' else # set if [ -z "$(grep "^$key=" $rvm_hash_file)" ] ; then # append echo "$key=$value" >> $rvm_hash_file else # overwrite sed -i# "s/^$key=.*$/$key=$value/" $rvm_hash_file @@ -393,9 +399,10 @@ echo "jruby 1.3.0" echo "jruby 1.3.1" echo "jruby head" echo "rubinius head" echo "rbx head" + echo "rbx head --jit" echo "ree 20090610" else echo -e "\nruby:\n$(/bin/ls -l $rvm_path/ | awk '/ ruby-[1-2].*/ { print " - " $NF }')\n" echo -e "jruby:\n$(/bin/ls -l $rvm_path/ | awk '/jruby-.*/ { print " - " $NF }')\n" echo -e "ree:\n$(/bin/ls $rvm_path/ | awk '/ruby-enterprise-.*/ { print " - " $NF }')\n"