Permalink
Browse files

Merge branch 'master' of github.com:wayneeseguin/rvm

  • Loading branch information...
2 parents 315b14e + 0403d38 commit fa414aaefd8008be412d583172bd652df7d6f1d9 @Sutto Sutto committed Nov 13, 2010
Showing with 254 additions and 70 deletions.
  1. +1 −1 config/db
  2. +2 −1 config/known
  3. +1 −0 config/md5
  4. +1 −1 lib/VERSION.yml
  5. +59 −0 pkg/gentoo/rvm-1.0.20.ebuild
  6. +59 −0 pkg/gentoo/rvm-1.0.21.ebuild
  7. +8 −2 scripts/cd
  8. +4 −2 scripts/cli
  9. +6 −4 scripts/gemsets
  10. +10 −2 scripts/install
  11. +10 −10 scripts/log
  12. +14 −9 scripts/manage
  13. +1 −1 scripts/package
  14. +1 −1 scripts/rvm
  15. +62 −20 scripts/selector
  16. +12 −13 scripts/set
  17. +3 −3 scripts/utility
View
@@ -41,7 +41,7 @@ ree_1.8.6_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition.git
ree_1.8.7_url=http://rvm.beginrescueend.com/src/
ree_1.8.7_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition187.git
ree_1.8.7_patch_level=2010.02
-jruby_version=1.5.3
+jruby_version=1.5.5
jruby_repo_url=git://github.com/jruby/jruby.git
jruby_url=http://jruby.org.s3.amazonaws.com/downloads
macruby_version=0.7.1
View
@@ -21,7 +21,8 @@ jruby-1.3.1
jruby-1.4.0
jruby-1.5.1
jruby-1.5.2
-jruby[-1.5.3]
+jruby-1.5.3
+jruby[-1.5.5]
jruby-head
# Rubinius
View
@@ -19,6 +19,7 @@ jruby-bin-1.5.0.tar.gz=ee2b4e326e8b87858e5dd0c8e94102e6
jruby-bin-1.5.1.tar.gz=0196dcfb17354f12253eaddc1166a0ee
jruby-bin-1.5.2.tar.gz=d239deb9a108a6abbfbd6cb79cf8255b
jruby-bin-1.5.3.tar.gz=ccb0b2dbc300d8dd4ad1bd4da48b8320
+jruby-bin-1.5.5.tar.gz=8e00f7d40cbf221f733d6f7a15784e9a
libiconv-1.13.1.tar.gz=7ab33ebd26687c744a37264a330bbe9a
ncurses.tar.gz=cce05daf61a64501ef6cd8da1f727ec6
openssl-0.9.8k.tar.gz=e555c6d58d276aec7fdc53363e338ab3
View
@@ -1,4 +1,4 @@
---
:major: 1
:minor: 0
-:patch: 19
+:patch: 21
@@ -0,0 +1,59 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils
+
+# This should be the first 7 characters of the tagged version's commit.
+VERSION_SHORT_SHA1="ec6fbf9"
+
+SRC_URI="http://github.com/wayneeseguin/rvm/tarball/${PV} -> ${P}.tar.gz"
+S="${WORKDIR}/wayneeseguin-rvm-${VERSION_SHORT_SHA1}"
+
+DESCRIPTION="RVM facilitates easy installation and management of multiple Ruby environments and sets of gems"
+HOMEPAGE="http://rvm.beginrescueend.com/"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="mono java"
+
+RDEPEND="net-misc/curl
+ sys-devel/patch
+ java? (
+ dev-java/sun-jdk
+ dev-java/sun-jre-bin
+ )
+ mono? ( dev-lang/mono )"
+
+RVM_DIR="/opt/rvm"
+
+src_install() {
+ for v in `env | egrep '^rvm_' | cut -d '=' -f 1`; do
+ unset $v
+ done
+
+ # Set variables for installation (only!)
+ export rvm_prefix="${D}"
+ export rvm_path="${D}${RVM_DIR}"
+ export rvm_selfcontained=1
+
+ ./install || die "Installation failed."
+
+ # Set variables for actual operation in a default rvmrc
+ echo "rvm_selfcontained=1" > "${T}"/rvmrc
+ echo "rvm_prefix=\"$(dirname $RVM_DIR)/\"" >> "${T}"/rvmrc
+ echo "rvm_path=\"${RVM_DIR}\"" >> "${T}"/rvmrc
+
+ insinto /etc
+ doins "${T}"/rvmrc || die "Failed to install /etc/rvmrc."
+ elog "A default /etc/rvmrc has been installed. Feel free to modify it."
+ elog
+
+ elog "Before any user (including root) can use rvm, the following line must be appended"
+ elog "to the end of the user's shell's loading files (.bashrc and then .bash_profile"
+ elog "for bash; or .zshrc for zsh), after all path/variable settings:"
+ elog
+ elog " [[ -s $RVM_DIR/scripts/rvm ]] && source $RVM_DIR/scripts/rvm"
+}
@@ -0,0 +1,59 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils
+
+# This should be the first 7 characters of the tagged version's commit.
+VERSION_SHORT_SHA1="b2e38b7"
+
+SRC_URI="http://github.com/wayneeseguin/rvm/tarball/${PV} -> ${P}.tar.gz"
+S="${WORKDIR}/wayneeseguin-rvm-${VERSION_SHORT_SHA1}"
+
+DESCRIPTION="RVM facilitates easy installation and management of multiple Ruby environments and sets of gems"
+HOMEPAGE="http://rvm.beginrescueend.com/"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="mono java"
+
+RDEPEND="net-misc/curl
+ sys-devel/patch
+ java? (
+ dev-java/sun-jdk
+ dev-java/sun-jre-bin
+ )
+ mono? ( dev-lang/mono )"
+
+RVM_DIR="/opt/rvm"
+
+src_install() {
+ for v in `env | egrep '^rvm_' | cut -d '=' -f 1`; do
+ unset $v
+ done
+
+ # Set variables for installation (only!)
+ export rvm_prefix="${D}"
+ export rvm_path="${D}${RVM_DIR}"
+ export rvm_selfcontained=1
+
+ ./install || die "Installation failed."
+
+ # Set variables for actual operation in a default rvmrc
+ echo "rvm_selfcontained=1" > "${T}"/rvmrc
+ echo "rvm_prefix=\"$(dirname $RVM_DIR)/\"" >> "${T}"/rvmrc
+ echo "rvm_path=\"${RVM_DIR}\"" >> "${T}"/rvmrc
+
+ insinto /etc
+ doins "${T}"/rvmrc || die "Failed to install /etc/rvmrc."
+ elog "A default /etc/rvmrc has been installed. Feel free to modify it."
+ elog
+
+ elog "Before any user (including root) can use rvm, the following line must be appended"
+ elog "to the end of the user's shell's loading files (.bashrc and then .bash_profile"
+ elog "for bash; or .zshrc for zsh), after all path/variable settings:"
+ elog
+ elog " [[ -s $RVM_DIR/scripts/rvm ]] && source $RVM_DIR/scripts/rvm"
+}
View
@@ -50,19 +50,25 @@ if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
# function returns that functionality.
_rvm_cd_complete ()
{
- local directory current matches item index
+ local directory current matches item index sep
+ sep="${IFS}"
+ declare -x IFS=$'\n'
COMPREPLY=()
current="${COMP_WORDS[COMP_CWORD]}"
if [[ -n "$CDPATH" && ${current:0:1} != "/" ]] ; then
index=0
- for directory in $(printf "$CDPATH" | tr -s ':' ' ') ; do
+ # The change to IFS above means that the tr below should replace ':'
+ # with a newline rather than a space. A space would be ignored, breaking
+ # TAB completion based on CDPATH again
+ for directory in $(printf "%s" "$CDPATH" | tr -s ':' '\n') ; do
for item in $( compgen -d "$directory/$current" ) ; do
COMPREPLY[index++]=${item#$directory/}
done
done
else
COMPREPLY=( $(compgen -d ${current}) )
fi
+ declare -x IFS="${sep}";
}
complete -o bashdefault -o default -o filenames -o dirnames -o nospace -F _rvm_cd_complete cd
View
@@ -575,7 +575,9 @@ __rvm_parse_args()
if "$rvm_path/scripts/match" "$rvm_token" ".rb$" ; then # we have a specified ruby script
rvm_ruby_args="$rvm_token"
rvm_ruby_file="$rvm_token"
- if [[ -z "${rvm_action:-""}" ]] ; then rvm_action="ruby" ; fi
+ if [[ -z "${rvm_action:-""}" || "$rvm_action" = "use" ]]; then
+ rvm_action="ruby"
+ fi
else
rvm_action="error"
rvm_error_message="Unrecognized command line argument: '$rvm_token'"
@@ -725,7 +727,7 @@ rvm()
rvm_ruby_gem_home="$gem_prefix"
GEM_HOME="$rvm_ruby_gem_home"
BUNDLE_PATH="$rvm_ruby_gem_home"
- GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}global/bin"
+ GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_gem_home${rvm_gemset_separator:-"@"}global"
export rvm_ruby_gem_home GEM_HOME BUNDLE_PATH GEM_PATH
fi
unset gem_prefix
View
@@ -470,7 +470,7 @@ gemset_unpack()
if [[ -n "$rvm_ruby_gem_home" ]] ; then
export GEM_HOME="$rvm_ruby_gem_home"
- export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin"
+ export GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
export BUNDLE_PATH="$rvm_ruby_gem_home"
fi
@@ -509,7 +509,7 @@ gemset_export()
if [[ -n "$rvm_ruby_gem_home" ]] ; then
export GEM_HOME="$rvm_ruby_gem_home"
- export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin"
+ export GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
export BUNDLE_PATH="$rvm_ruby_gem_home"
fi
@@ -616,7 +616,8 @@ gemset_import()
done < <(awk '/^[^#]+/{print}' "${rvm_file_name}")
else
- "$rvm_path/scripts/log" "error" "${rvm_file_name} does not exist to import from."
+ "$rvm_path/scripts/log" "error" \
+ "${rvm_file_name} does not exist to import from."
fi
}
@@ -748,7 +749,8 @@ gem_install()
unset -f gem
- __rvm_run "gem.install" "$command" "installing ${gem_name} ${gem_version}..."
+ __rvm_run "gem.install" "$command" \
+ "installing ${gem_name} ${gem_version}..."
result=$?
if [[ $result -eq 0 ]] ; then
View
@@ -42,7 +42,7 @@ usage()
--version : display rvm package version
- "
+ \n"
}
check_rubyopt_conditions()
@@ -192,7 +192,15 @@ while [[ $# -gt 0 ]] ; do
env | grep '^rvm_'
set -o xtrace
;;
- --help|*) usage ;;
+ --help)
+ usage
+ exit 0
+ ;;
+ *)
+ echo "Unrecognized option: $token"
+ usage
+ exit 1
+ ;;
esac
done
View
@@ -16,21 +16,21 @@ if [[ ${rvm_pretty_print_flag:-0} -eq 0 ]] ; then
fi
case "$level" in
- info) printf "${message#*: }\n" ;;
- debug|warn) printf "$message\n" ;;
- error|fail) printf "$message\n" >&2 ;;
- *) printf "$message"
+ info) printf -- "${message#*: }\n" ;;
+ debug|warn) printf -- "$message\n" ;;
+ error|fail) printf -- "$message\n" >&2 ;;
+ *) printf "$message\n"
esac
else
case "$level" in
- debug) printf "$(tput setaf 5)$level$(tput sgr0): $message\n" ;;
- info) printf "$(tput setaf 2)$level$(tput sgr0): $message\n" ;;
- warn) printf "$(tput setaf 3)$level$(tput sgr0): $message\n" ;;
- error) printf "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
- fail) printf "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
- *) printf "$message"
+ debug) printf -- "$(tput setaf 5)$level$(tput sgr0): $message\n" ;;
+ info) printf -- "$(tput setaf 2)$level$(tput sgr0): $message\n" ;;
+ warn) printf -- "$(tput setaf 3)$level$(tput sgr0): $message\n" ;;
+ error) printf -- "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
+ fail) printf -- "$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
+ *) printf -- "$message\n"
esac
fi
View
@@ -169,7 +169,7 @@ __rvm_install_source()
__rvm_apply_patches
result="$?"
- if [[ "$result" -gt 0 ]]; then
+ if [[ $result -gt 0 ]]; then
"$rvm_path/scripts/log" "fail" \
"There has been an error applying the specified patches. Halting the installation."
return $result
@@ -194,7 +194,7 @@ __rvm_install_source()
__rvm_run "configure" "$rvm_ruby_configure"
result=$?
- if [[ "$result" -gt 0 ]] ; then
+ if [[ $result -gt 0 ]] ; then
"$rvm_path/scripts/log" "error" \
"There has been an error while configuring. Halting the installation."
return $result
@@ -223,7 +223,7 @@ __rvm_install_source()
__rvm_run "configure" "$configure_command" "$rvm_ruby_string - #configuring "
result=$?
- if [[ "$result" -gt 0 ]] ; then
+ if [[ $result -gt 0 ]] ; then
"$rvm_path/scripts/log" "error" \
"There has been an error while running configure. Halting the installation."
return $result
@@ -239,7 +239,7 @@ __rvm_install_source()
__rvm_run "make" "$rvm_ruby_make ${rvm_make_flags:-""}" "$rvm_ruby_string - #compiling "
result=$?
- if [[ "$result" -gt 0 ]] ; then
+ if [[ $result -gt 0 ]] ; then
"$rvm_path/scripts/log" "error" \
"There has been an error while running make. Halting the installation."
return $result
@@ -254,7 +254,7 @@ __rvm_install_source()
__rvm_run "install" "$rvm_ruby_make_install" "$rvm_ruby_string - #installing "
result=$?
- if [[ "$result" -gt 0 ]] ; then
+ if [[ $result -gt 0 ]] ; then
"$rvm_path/scripts/log" "error" \
"There has been an error while running make install. Halting the installation."
return $result
@@ -290,7 +290,7 @@ __rvm_install_ruby()
# Check for clang if the flag is set
__rvm_check_for_clang
- result="$?"
+ result=$?
[[ $result -gt 0 ]] && return $result
@@ -1084,7 +1084,7 @@ RubyWrapper
fi
fi
- if [[ -s ./Makefile ]] && [[ -z "$rvm_reconfigure_flag" ]] ; then
+ if [[ -s ./Makefile && -z "$rvm_reconfigure_flag" ]] ; then
if [[ ${rvm_debug_flag:-0} -gt 0 ]] ; then
"$rvm_path/scripts/log" "debug" \
@@ -1179,8 +1179,10 @@ RubyWrapper
"a ruby interpreter to install must be specified and not simply 'default'."
;;
- *) "$rvm_path/scripts/log" "fail" \
- "Ruby interpreter '$rvm_ruby_interpreter' is not known."
+ *)
+ "$rvm_path/scripts/log" "fail" \
+ "Either the ruby interpreter is unknown or there was an error!."
+ ;;
esac
@@ -1335,6 +1337,9 @@ __rvm_fetch_ruby()
;;
esac
+ if [[ -d "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string" ]] ; then
+ rm -rf "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
+ fi
mv "/tmp/rvm_src_$$/$(builtin cd /tmp/rvm_src_$$ ; ls)" "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string" ; rm -rf "/tmp/rvm_src_$$"
if [[ -n "${rvm_ruby_name:-""}" && -d "${rvm_src_path:-"$rvm_path/src"}/$(echo $rvm_ruby_string | sed -e 's/-n.*//')" ]] ; then
View
2 scripts/package 100755 → 100644
@@ -297,6 +297,6 @@ else
"$rvm_path/scripts/log" "info" \
" 'ree_dependencies' installs zlib, ncurses, readline, openssl and iconv in this order."
"$rvm_path/scripts/log" "info" \
- " still need to add '-C --with-readline-dir=\$rvm_path/usr,--with-iconv-dir=\$rvm_path/usr,--with-zlib-dir=\$rvm_path/usr,--with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'"
+ " still need to add ' --with-readline-dir=\$rvm_path/usr --with-iconv-dir=\$rvm_path/usr --with-zlib-dir=\$rvm_path/usr --with-openssl-dir=\$rvm_path/usr' to 'rvm install ree'"
exit 1
fi
View
@@ -4,7 +4,7 @@
# http://rvm.beginrescueend.com
# http://github.com/wayneeseguin/rvm
-grep -q '^rvm ()' < <( declare -f ) # Is RVM is a shell function?
+\grep -q '^rvm ()' < <( declare -f ) # Is RVM is a shell function?
if [[ $? -gt 0 || ${rvm_reload_flag:-0} -eq 1 ]] ; then
Oops, something went wrong.

0 comments on commit fa414aa

Please sign in to comment.