Skip to content

Commit

Permalink
add rvm list remote all, update #1428
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Jan 8, 2013
1 parent e330bf3 commit aefe189
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
11 changes: 6 additions & 5 deletions help/list
Expand Up @@ -2,7 +2,7 @@ Show list of available rubies,


## Usage: ## Usage:


rvm list [help,known,remote [|rbx|jruby],gemsets,default [string],rubies,strings,known_strings,ruby_svn_tags] rvm list [help,known,remote [|rbx|jruby|all],gemsets,default [string],rubies,strings,known_strings,ruby_svn_tags]


## Actions: ## Actions:


Expand All @@ -11,7 +11,8 @@ Show list of available rubies,
- `gemsets` - list all rubies with their gemsets - `gemsets` - list all rubies with their gemsets
- `rubies` - list installed rubies, it is the default action when none given - `rubies` - list installed rubies, it is the default action when none given
- `strings` - list installed rubies, machine passable form - `strings` - list installed rubies, machine passable form
- `known_strings` - list known rubies, that can be installed, machine passable form - `known_strings` - list known rubies, that can be installed, machine passable form
- `ruby_svn_tags` - list ruby tags available at http://svn.ruby-lang.org/repos/ruby/tags/ - `ruby_svn_tags` - list ruby tags available at http://svn.ruby-lang.org/repos/ruby/tags/
- `default [string]` - show the default ruby, passable form with strings - `default [string]` - show the default ruby, passable form with strings
- `remote [|rbx|jruby]` - list binary build rubies (also for rbx/jruby), they do not need compilation - `remote [|rbx|jruby|all]` - list binary build rubies (also for all/rbx/jruby), they do not need compilation,
when parameter omitted then only rvm build binaries are listed.
16 changes: 13 additions & 3 deletions scripts/functions/utility
Expand Up @@ -494,7 +494,7 @@ __rvm_system_path()
else return $? else return $?
fi fi
if [[ "${1:-}" == "-" ]] if [[ "${1:-}" == "-" ]]
then printf "%b" "${rvm_remote_server_path}" then printf "%b" "${rvm_remote_server_path}\n"
fi fi
} }


Expand All @@ -508,12 +508,12 @@ __rvm_system_path_for()
rvm_remote_server_type="$(__rvm_db "rvm_remote_server_type${_iterator}")" rvm_remote_server_type="$(__rvm_db "rvm_remote_server_type${_iterator}")"
[[ -n "${rvm_remote_server_type}" ]] || return 0 [[ -n "${rvm_remote_server_type}" ]] || return 0
if if
[[ "${rvm_remote_server_type}" == "$1" ]] [[ "${rvm_remote_server_type}" == "$1" || "$1" == "all" ]]
then then
__rvm_system_path - "${_iterator}" __rvm_system_path - "${_iterator}"
fi fi
: $(( _iterator+=1 )) : $(( _iterator+=1 ))
done done | sort -u | tr "\n" "|" | sed 's/|$//'
} }


__rvm_remote_extension() __rvm_remote_extension()
Expand Down Expand Up @@ -600,6 +600,16 @@ __rvm_remote_server_path()
done done
} }


__list_remote_all_for()
{
#TODO: read the list from db
{
__list_remote_rubies_for "$1"
__list_remote_rbx_for "$1"
__list_remote_jruby_for "$1"
} | sort -u
}

__list_remote_rubies_for() __list_remote_rubies_for()
{ {
typeset rvm_ruby_url typeset rvm_ruby_url
Expand Down

0 comments on commit aefe189

Please sign in to comment.