Permalink
Browse files

Removed a failed attempt at a self aware script ;)

  • Loading branch information...
1 parent cf8f917 commit 92e7257feb4eab91af65c1f4e9464a5cc591b803 @wayneeseguin wayneeseguin committed Dec 2, 2009
Showing with 8 additions and 16 deletions.
  1. +1 −3 binscripts/rvm
  2. +1 −3 scripts/cli
  3. +6 −5 scripts/install
  4. +0 −5 scripts/rvm
View
@@ -13,6 +13,4 @@ if [[ -z "$rvm_path" ]] ; then
fi
source $rvm_path/scripts/rvm
-
-__rvm "$*"
-
+rvm "$*"
View
@@ -334,9 +334,7 @@ __rvm_parse_args() {
if [[ ! -z "$rvm_error_message" ]] ; then __rvm_pushpop ; return 1 ; fi
}
-rvm() { __rvm "$*" ; }
-
-__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.
View
@@ -48,8 +48,11 @@ done ; unset dir_name
# Bin Scripts
#
echo -e "\n Installing bin scripts to $rvm_path/bin ..."
-rm -f $rvm_path/bin/rvm # Cleanse and purge...
-cp -Rf "$source_dir/binscripts" $rvm_path/bin
+# Cleanse and purge...
+rm -f $rvm_path/bin/rvm ; rm -rf $rvm_path/bin/binscripts
+for file in rvm-prompt rvm ; do
+ cp -f "$source_dir/binscripts/$file" $rvm_path/bin/
+done
chmod +x $rvm_path/bin/*
#
@@ -85,8 +88,6 @@ echo -e "\n$(tput setaf 2)RTFM:\n $(tput sgr0) http://rvm.beginrescueend.com/
echo -e "$(tput setaf 2)w⦿‿⦿t!$(tput sgr0)"
echo -e "\n ~ Wayne\n"
-if [[ -x "$rvm_path/scripts/rvm" ]] ; then
- "$rvm_path/scripts/rvm" -v
-fi
+if [[ -x "$rvm_path/scripts/rvm" ]] ; then "$rvm_path/scripts/rvm" -v ; fi
exit 0
View
@@ -4,9 +4,6 @@
# http://rvm.beginrescueend.com
# http://gitub.com/wayneeseguin/rvm
-# Determine if we were called or sourced... under assumption of course ;)
-if [[ $# -gt 0 ]] && [[ -z "$(echo "$*" | awk '/completion-/')" ]] && [[ "$(basename $0)" = "rvm" ]] ; then run=1 ; fi
-
if [[ "$run" -eq 1 ]] || [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
if [[ ! -z "$rvm_reload_flag" ]] ; then
unset rvm_reload_flag
@@ -46,5 +43,3 @@ if [[ "$run" -eq 1 ]] || [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag
if [[ -f "$rvm_path/default" ]] ; then source "$rvm_path/default" ; fi
fi
-if [[ "$run" -eq 1 ]] ; then rvm "$*" ; fi
-

0 comments on commit 92e7257

Please sign in to comment.