Skip to content

Instantly share code, notes, and snippets.

@iconara
Created September 30, 2010 13:20
Show Gist options
  • Save iconara/604560 to your computer and use it in GitHub Desktop.
Save iconara/604560 to your computer and use it in GitHub Desktop.
~% rvm --trace wrapper 1.8.7@wukong wukong 15:19 reventon
+__rvm_parse_args:414> [[ -z 4.3.9 ]]
+__rvm_parse_args:570> [[ -z '' && -n '' ]]
+__rvm_parse_args:572> [[ 0 -eq 1 || -n '' ]]
+__rvm_parse_args:15> [[ -n wrapper ]]
+__rvm_parse_args:17> rvm_token=wrapper
+__rvm_parse_args:19> [[ 2 -gt 0 ]]
+__rvm_parse_args:19> next_token=1.8.7@wukong
+__rvm_parse_args:19> shift
+__rvm_parse_args:21> case wrapper (fetch|version|srcdir|reset|debug|reload|update|monitor|notes|implode|seppuku|question|answer|env)
+__rvm_parse_args:21> case wrapper (package)
+__rvm_parse_args:21> case wrapper (use)
+__rvm_parse_args:21> case wrapper (install|uninstall)
+__rvm_parse_args:21> case wrapper (rm|remove)
+__rvm_parse_args:21> case wrapper (jruby*|ree*|macruby*|rbx*|rubinius*|mput*|shyouhei*|ironruby*|default*|maglev*|all)
+__rvm_parse_args:21> case wrapper (default)
+__rvm_parse_args:21> case wrapper (gemset)
+__rvm_parse_args:21> case wrapper (gemdir|gempath|gemhome)
+__rvm_parse_args:21> case wrapper (inspect|list|info|strings)
+__rvm_parse_args:21> case wrapper (-S)
+__rvm_parse_args:21> case wrapper (-e)
+__rvm_parse_args:21> case wrapper (docs|alias|rubygems|exec|cleanup|tools|disk-usage|snapshot|repair|migrate|upgrade)
+__rvm_parse_args:21> case wrapper (load-rvmrc)
+__rvm_parse_args:21> case wrapper (rvmrc)
+__rvm_parse_args:21> case wrapper (do|ruby|rake|gem|rubydo|rakedo|gemdo)
+__rvm_parse_args:21> case wrapper (benchmark|bench)
+__rvm_parse_args:21> case wrapper (specs|tests)
+__rvm_parse_args:21> case wrapper (-v|--version)
+__rvm_parse_args:21> case wrapper (--repository|--repo|--url)
+__rvm_parse_args:21> case wrapper (--ree-options)
+__rvm_parse_args:21> case wrapper (--patches|--patch)
+__rvm_parse_args:21> case wrapper (--head)
+__rvm_parse_args:21> case wrapper (--bin)
+__rvm_parse_args:21> case wrapper (-r|--require)
+__rvm_parse_args:21> case wrapper (--rdoc|--yard)
+__rvm_parse_args:21> case wrapper (-f|--file)
+__rvm_parse_args:21> case wrapper (system|default)
+__rvm_parse_args:21> case wrapper (help)
+__rvm_parse_args:21> case wrapper (--passenger)
+__rvm_parse_args:21> case wrapper (--editor)
+__rvm_parse_args:21> case wrapper (--alias)
+__rvm_parse_args:21> case wrapper (--symlink)
+__rvm_parse_args:21> case wrapper (wrapper)
+__rvm_parse_args:350> rvm_action=wrapper
+__rvm_parse_args:351> rvm_ruby_string=1.8.7@wukong
+__rvm_parse_args:352> [[ 1 -gt 0 ]]
+__rvm_parse_args:352> next_token=wukong
+__rvm_parse_args:352> shift
+__rvm_parse_args:353> rvm_wrapper_name=wukong
+__rvm_parse_args:354> [[ 0 -gt 0 ]]
+__rvm_parse_args:354> next_token=''
+__rvm_parse_args:355> rvm_ruby_args=' '
+__rvm_parse_args:356> rvm_parse_break=1
+__rvm_parse_args:570> [[ -z wrapper ]]
+__rvm_parse_args:572> [[ 1 -eq 1 ]]
+__rvm_parse_args:572> break
+__rvm_parse_args:576> [[ 0 -gt 0 ]]
+__rvm_parse_args:578> [[ -n '' ]]
++ [[ -z '' ]]
++ export 'PS4=+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
++ PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
++[/Users/theo/.rvm/scripts/base] : 39 : [[ -n '' ]]
++[/Users/theo/.rvm/scripts/base] : 42 : __array_start=0
++[/Users/theo/.rvm/scripts/base] : 45 : export BUNDLE_PATH GEM_HOME GEM_PATH rvm_action rvm_alias_expanded rvm_archflags rvm_archive_extension rvm_bin_flag rvm_bin_path rvm_clang_flag rvm_configure_flags rvm_debug_flag rvm_default_flag rvm_delete_flag rvm_docs_type rvm_dump_environment_flag rvm_error_message rvm_expanding_aliases rvm_file_name rvm_gemdir_flag rvm_gemset_name rvm_gemstone_package_file rvm_gemstone_url rvm_head_flag rvm_hook rvm_install_arguments rvm_install_on_use_flag rvm_interactive_flag rvm_llvm_flag rvm_loaded_flag rvm_make_flags rvm_niceness rvm_nightly_flag rvm_only_path_flag rvm_parse_break rvm_patch_names rvm_patch_original_pwd rvm_pretty_print_flag rvm_prior_cc rvm_proxy rvm_quiet_flag rvm_ree_options rvm_reload_flag rvm_remove_flag rvm_ruby_alias rvm_ruby_aliases rvm_ruby_args rvm_ruby_binary rvm_ruby_bits rvm_ruby_configure rvm_ruby_file rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_global_gems_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_load_path rvm_ruby_major_version rvm_ruby_make rvm_ruby_make_install rvm_ruby_minor_version rvm_ruby_mode rvm_ruby_name rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_patch rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_require rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_sha rvm_ruby_string rvm_ruby_strings rvm_ruby_tag rvm_ruby_url rvm_ruby_user_tag rvm_ruby_version rvm_script_name rvm_sdk rvm_silent_flag rvm_sticky_flag rvm_system_flag rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_wrapper_name
++[/Users/theo/.rvm/scripts/base] : 49 : trap '__rvm_cleanup_temp_for '\''27807'\''' 0 1 2 3 15
+[/Users/theo/.rvm/scripts/wrapper] : 107 : [[ 3 -eq 0 ]]
+[/Users/theo/.rvm/scripts/wrapper] : 111 : ruby_string=1.8.7@wukong
+[/Users/theo/.rvm/scripts/wrapper] : 112 : shift
+[/Users/theo/.rvm/scripts/wrapper] : 115 : [[ 2 -gt 0 ]]
+[/Users/theo/.rvm/scripts/wrapper] : 116 : prefix=wukong
+[/Users/theo/.rvm/scripts/wrapper] : 117 : shift
+[/Users/theo/.rvm/scripts/wrapper] : 120 : [[ -z 1.8.7@wukong ]]
+[/Users/theo/.rvm/scripts/wrapper] : 125 : binaries=("$@")
+[/Users/theo/.rvm/scripts/wrapper] : 126 : override_check=0
+[/Users/theo/.rvm/scripts/wrapper] : 129 : [[ 1 -eq 0 ]]
+[/Users/theo/.rvm/scripts/wrapper] : 134 : __rvm_become 1.8.7@wukong
+[/Users/theo/.rvm/scripts/utility] : 1045 : __rvm_become() $ local string=1.8.7@wukong
+[/Users/theo/.rvm/scripts/utility] : 1047 : __rvm_become() $ [[ -n 1.8.7@wukong ]]
+[/Users/theo/.rvm/scripts/utility] : 1047 : __rvm_become() $ rvm_ruby_string=1.8.7@wukong
+[/Users/theo/.rvm/scripts/utility] : 1051 : __rvm_become() $ return 0
+[/Users/theo/.rvm/scripts/wrapper] : 136 : __rvm_ensure_has_environment_files
+[/Users/theo/.rvm/scripts/utility] : 1056 : __rvm_ensure_has_environment_files() $ local environment_id file_name directory identifier variable value variables
++[/Users/theo/.rvm/scripts/utility] : 1058 : __rvm_ensure_has_environment_files() $ __rvm_environment_identifier
++[/Users/theo/.rvm/scripts/utility] : 1457 : __rvm_environment_identifier() $ local path string
++[/Users/theo/.rvm/scripts/utility] : 1459 : __rvm_environment_identifier() $ path=/Users/theo/.rvm/gems/ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1461 : __rvm_environment_identifier() $ string=ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1462 : __rvm_environment_identifier() $ string=ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1464 : __rvm_environment_identifier() $ printf ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1466 : __rvm_environment_identifier() $ return 0
+[/Users/theo/.rvm/scripts/utility] : 1058 : __rvm_ensure_has_environment_files() $ environment_id=ruby-1.8.7-p302@wukong
+[/Users/theo/.rvm/scripts/utility] : 1060 : __rvm_ensure_has_environment_files() $ file_name=/Users/theo/.rvm/environments/ruby-1.8.7-p302@wukong
+[/Users/theo/.rvm/scripts/utility] : 1062 : __rvm_ensure_has_environment_files() $ [[ ! -s /Users/theo/.rvm/environments/ruby-1.8.7-p302@wukong ]]
+[/Users/theo/.rvm/scripts/utility] : 1092 : __rvm_ensure_has_environment_files() $ [[ 0 -eq 1 ]]
+[/Users/theo/.rvm/scripts/utility] : 1092 : __rvm_ensure_has_environment_files() $ [[ ! -f /Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ruby ]]
+[/Users/theo/.rvm/scripts/utility] : 1112 : __rvm_ensure_has_environment_files() $ return 0
++[/Users/theo/.rvm/scripts/wrapper] : 138 : __rvm_environment_identifier
++[/Users/theo/.rvm/scripts/utility] : 1457 : __rvm_environment_identifier() $ local path string
++[/Users/theo/.rvm/scripts/utility] : 1459 : __rvm_environment_identifier() $ path=/Users/theo/.rvm/gems/ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1461 : __rvm_environment_identifier() $ string=ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1462 : __rvm_environment_identifier() $ string=ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1464 : __rvm_environment_identifier() $ printf ruby-1.8.7-p302@wukong
++[/Users/theo/.rvm/scripts/utility] : 1466 : __rvm_environment_identifier() $ return 0
+[/Users/theo/.rvm/scripts/wrapper] : 138 : environment_identifier=ruby-1.8.7-p302@wukong
+[/Users/theo/.rvm/scripts/wrapper] : 142 : for binary_name in '"${binaries[@]}"'
+[/Users/theo/.rvm/scripts/wrapper] : 144 : file_name='/Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ '
+[/Users/theo/.rvm/scripts/wrapper] : 146 : [[ 0 -gt 0 ]]
+[/Users/theo/.rvm/scripts/wrapper] : 152 : [[ ! -d /Users/theo/.rvm/bin ]]
+[/Users/theo/.rvm/scripts/wrapper] : 156 : [[ -z wukong ]]
+[/Users/theo/.rvm/scripts/wrapper] : 181 : [[ --no-prefix == \w\u\k\o\n\g ]]
+[/Users/theo/.rvm/scripts/wrapper] : 202 : symlink_binary
+[/Users/theo/.rvm/scripts/wrapper] : 79 : symlink_binary() $ wrap_binary
+[/Users/theo/.rvm/scripts/wrapper] : 92 : wrap_binary() $ [[ 0 = \1 ]]
+[/Users/theo/.rvm/scripts/wrapper] : 92 : wrap_binary() $ command -v
+[/Users/theo/.rvm/scripts/wrapper] : 94 : wrap_binary() $ wrap
+[/Users/theo/.rvm/scripts/wrapper] : 35 : wrap() $ [[ -n /Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ ]]
++[/Users/theo/.rvm/scripts/wrapper] : 37 : wrap() $ dirname '/Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ '
+[/Users/theo/.rvm/scripts/wrapper] : 37 : wrap() $ mkdir -p /Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong
+[/Users/theo/.rvm/scripts/wrapper] : 39 : wrap() $ rm -f '/Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ '
+[/Users/theo/.rvm/scripts/wrapper] : 41 : wrap() $ [[ root = \t\h\e\o ]]
+[/Users/theo/.rvm/scripts/wrapper] : 44 : wrap() $ path=/Users/theo/.rvm
+[/Users/theo/.rvm/scripts/wrapper] : 56 : wrap() $ printf '#!/usr/bin/env bash
if [[ -s "/Users/theo/.rvm/environments/ruby-1.8.7-p302@wukong" ]] ; then
\. "/Users/theo/.rvm/environments/ruby-1.8.7-p302@wukong"
exec "$@"
else
echo "ERROR: Missing RVM environment file: '\''/Users/theo/.rvm/environments/ruby-1.8.7-p302@wukong'\''" >&2
exit 1
fi
'
+[/Users/theo/.rvm/scripts/wrapper] : 58 : wrap() $ [[ -f /Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ ]]
+[/Users/theo/.rvm/scripts/wrapper] : 59 : wrap() $ chmod +x '/Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ '
+[/Users/theo/.rvm/scripts/wrapper] : 62 : wrap() $ return 0
+[/Users/theo/.rvm/scripts/wrapper] : 79 : symlink_binary() $ [[ -f /Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ ]]
+[/Users/theo/.rvm/scripts/wrapper] : 81 : symlink_binary() $ rm -f '/Users/theo/.rvm/bin/wukong_ '
+[/Users/theo/.rvm/scripts/wrapper] : 83 : symlink_binary() $ ln -fs '/Users/theo/.rvm/wrappers/ruby-1.8.7-p302@wukong/ ' '/Users/theo/.rvm/bin/wukong_ '
+[/Users/theo/.rvm/scripts/wrapper] : 208 : exit 0
+[/Users/theo/.rvm/scripts/wrapper] : 208 : __rvm_cleanup_temp_for 27807
+[/Users/theo/.rvm/scripts/utility] : 430 : __rvm_cleanup_temp_for() $ result=0
+[/Users/theo/.rvm/scripts/utility] : 432 : __rvm_cleanup_temp_for() $ [[ -z 27807 ]]
+[/Users/theo/.rvm/scripts/utility] : 434 : __rvm_cleanup_temp_for() $ [[ -d /Users/theo/.rvm/tmp/ ]]
+[/Users/theo/.rvm/scripts/utility] : 436 : __rvm_cleanup_temp_for() $ rm -rf '/Users/theo/.rvm/tmp/27807*'
+[/Users/theo/.rvm/scripts/utility] : 440 : __rvm_cleanup_temp_for() $ return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment