scripts/cli in rvm-0.0.74 vs scripts/cli in rvm-0.0.75
- old
+ new
@@ -1,19 +1,19 @@
#!/bin/bash
-function __rvm_meta {
+__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="${rvm_version}"
}
-function __rvm_version { __rvm_meta ; echo "rvm ${rvm_meta_version} by ${rvm_meta_author} (${rvm_meta_author_email}) [${rvm_meta_website}]" ; }
+__rvm_version() { __rvm_meta ; echo "rvm ${rvm_meta_version} by ${rvm_meta_author} (${rvm_meta_author_email}) [${rvm_meta_website}]" ; }
-function __rvm_usage { cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less} ; }
+__rvm_usage() { cat "${rvm_path:-$HOME/.rvm}/README" | ${PAGER:-less} ; }
-function __rvm_parse_args {
+__rvm_parse_args() {
if [[ ! -z "$(echo "$*" | awk '/trace/')" ]] ; then echo "$*" ; fi
while [[ $# -gt 0 ]] ; do
rvm_token="$1" ; shift
case "$rvm_token" in
@@ -168,11 +168,16 @@
--repository|--repo|--url)
rvm_ruby_repo_url=$rvm_token
;;
--ree-options)
- rvm_ree_options="$rvm_token"
+ if [[ ! -z "$1" ]] ; then
+ rvm_ree_options="$(echo $1 | tr ',' ' ')" ; shift
+ else
+ rvm_action="error"
+ rvm_error_message="--ree-options *must* be followed by... well... options."
+ fi
;;
-t|--tag)
rvm_ruby_tag="$1";
rvm_action="${rvm_action:-use}"
@@ -345,10 +350,10 @@
done
if [[ ! -z "$rvm_error_message" ]] ; then __rvm_pushpop ; return 1 ; fi
}
-function rvm {
+rvm() {
trap '__rvm_cleanup_variables ; rm -rf "/tmp/rvm/$$" >/dev/null 2>&1' 0 1 2 3 15
# Check that this is the current version.
disk_version=$(cat "${rvm_path:-$HOME/.rvm}/lib/VERSION.yml" | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//')