Skip to content

Commit

Permalink
Merge branch 'release/1.13.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Apr 24, 2012
2 parents 6c7f976 + a0906be commit d21fac7
Show file tree
Hide file tree
Showing 51 changed files with 140 additions and 126 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.12.5
1.13.0
2 changes: 1 addition & 1 deletion binscripts/rvm
Expand Up @@ -7,7 +7,7 @@ then
do
if [[ -f "$rvmrc" ]]
then
if grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "
Error:
Expand Down
2 changes: 1 addition & 1 deletion binscripts/rvm-auto-ruby
Expand Up @@ -8,7 +8,7 @@ then
do
if [[ -f "$rvmrc" ]]
then
if \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "\nError: $rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
return 1
Expand Down
4 changes: 2 additions & 2 deletions binscripts/rvm-exec
Expand Up @@ -8,7 +8,7 @@ then
do
if [[ -f "$rvmrc" ]]
then
if grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "\n Error:
$rvmrc is for rvm settings only.
Expand Down Expand Up @@ -49,7 +49,7 @@ __rvm_shell_lookup_script() {
done
}

if [[ -n "$1" && ! -f "$1" && -n "$(echo "$1" | \grep -v '^-')" ]]; then
if [[ -n "$1" && ! -f "$1" && -n "$(echo "$1" | GREP_OPTIONS="" \grep -v '^-')" ]]; then
rvm_shell_ruby_string="$1"
shift
fi
Expand Down
13 changes: 10 additions & 3 deletions binscripts/rvm-installer
@@ -1,5 +1,12 @@
#!/usr/bin/env bash

if [[ -n "${BASH_VERSION:-}" ]] &&
(( 65536 * ${BASH_VERSINFO[0]} + 256 * ${BASH_VERSINFO[1]} + ${BASH_VERSINFO[2]} < 197168 ))
then
echo "BASH 3.2.48 required (you have $BASH_VERSION)"
exit 1
fi

shopt -s extglob
PS4="+ \${BASH_SOURCE##\${rvm_path:-}} : \${FUNCNAME[0]:+\${FUNCNAME[0]}()} \${LINENO} > "
export PS4
Expand All @@ -17,7 +24,7 @@ else
rvm_tar_command=tar
fi
if [[ ! " ${rvm_tar_options:-} " =~ " --no-same-owner " ]] && \
$rvm_tar_command --help | \grep -- --no-same-owner >/dev/null
$rvm_tar_command --help | GREP_OPTIONS="" \grep -- --no-same-owner >/dev/null
then
rvm_tar_options="${rvm_tar_options:-} --no-same-owner"
rvm_tar_options="${rvm_tar_options## }"
Expand Down Expand Up @@ -67,7 +74,7 @@ fetch_version()
curl -s https://api.github.com/repos/wayneeseguin/rvm/tags |
sed -n '/"name": / {s/^.*".*": "\(.*\)".*$/\1/; p;}' |
sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n |
grep "^${1:-}" | tail -n 1
GREP_OPTIONS="" \grep "^${1:-}" | tail -n 1
}

install_release()
Expand Down Expand Up @@ -181,7 +188,7 @@ then
do
if [[ -s "$rvmrc" ]]
then
if \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "
Error: $rvmrc is for rvm settings only.
Expand Down
4 changes: 2 additions & 2 deletions binscripts/rvm-prompt
Expand Up @@ -37,7 +37,7 @@ add_raw_token()

rvm_gemset_separator="${rvm_gemset_separator:-"@"}"

ruby=$( builtin command -v ruby | grep -v $rvm_path/bin/ruby )
ruby=$( builtin command -v ruby | GREP_OPTIONS="" \grep -v $rvm_path/bin/ruby )

if [[ -n "$ruby" && -n "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; then

Expand Down Expand Up @@ -193,7 +193,7 @@ if [[ -n "$ruby" && -n "$(echo "$ruby" | awk '/rvm/{print}')" ]] ; then

esac

if echo "$ruby_string" | \grep '-head' >/dev/null 2>&1 ; then
if echo "$ruby_string" | GREP_OPTIONS="" \grep '-head' >/dev/null 2>&1 ; then

unicode="${unicode}"

Expand Down
4 changes: 2 additions & 2 deletions binscripts/rvm-shell
Expand Up @@ -8,7 +8,7 @@ then
do
if [[ -f "$rvmrc" ]]
then
if \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "\nError: $rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
return 1
Expand Down Expand Up @@ -58,7 +58,7 @@ case $0 in
esac
selected_shell="$(basename "${selected_shell}")"

if [[ -n "$1" && ! -f "$1" && -n "$(echo "$1" | \grep -v '^-')" ]]
if [[ -n "$1" && ! -f "$1" && -n "$(echo "$1" | GREP_OPTIONS="" \grep -v '^-')" ]]
then
rvm_shell_ruby_string="$1"
shift
Expand Down
2 changes: 1 addition & 1 deletion binscripts/rvmsudo
Expand Up @@ -43,7 +43,7 @@ done

if [[ $# -gt 0 ]]
then
eval command sudo \"\${sudo_args[@]}\" /usr/bin/env $(/usr/bin/env | grep -E '^rvm|^gemset|^PATH|^IRBRC|RUBY|GEM' | sed 's/=\(.*\)$/="\1"/' ) \"\$@\"
eval command sudo \"\${sudo_args[@]}\" /usr/bin/env $(/usr/bin/env | GREP_OPTIONS="" \grep -E '^rvm|^gemset|^PATH|^IRBRC|RUBY|GEM' | sed 's/=\(.*\)$/="\1"/' ) \"\$@\"
else
printf "%b" "Usage:\n $0 [--trace] [--verbose] [sudo-options] command [command-options]\n"
fi
1 change: 1 addition & 0 deletions help/alt.md
Expand Up @@ -8,6 +8,7 @@ Other implementations allowing to switch ruby environment:
- https://github.com/niw/rubies
- https://github.com/hmans/rbfu
- https://github.com/sam/rb-switch
- https://github.com/nkryptic/sandbox
- https://github.com/sstephenson/rbenv
- https://github.com/cpetschnig/switch-ruby
- https://github.com/mugenken/p5-Ruby-VersionManager (Perl!)
Expand Down
2 changes: 1 addition & 1 deletion scripts/alias
Expand Up @@ -252,7 +252,7 @@ result=0

if [[ ! -f "$rvm_path/config/alias" ]] ; then touch "$rvm_path/config/alias" ; fi

if printf "%b" "$alias_name" | grep "${rvm_gemset_separator:-"@"}" >/dev/null 2>&1 ; then
if printf "%b" "$alias_name" | GREP_OPTIONS="" \grep "${rvm_gemset_separator:-"@"}" >/dev/null 2>&1 ; then
gemset_name="${alias_name/*${rvm_gemset_separator:-"@"}/}"
alias_name="${alias_name/${rvm_gemset_separator:-"@"}*/}"
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/base
Expand Up @@ -42,7 +42,7 @@ then
do
if [[ -f "$rvmrc" ]]
then
if \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "
Error:
Expand Down
4 changes: 2 additions & 2 deletions scripts/cli
Expand Up @@ -826,7 +826,7 @@ rvm()
do
if [[ -f "$rvmrc" ]]
then
if \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$rvmrc" >/dev/null 2>&1
then
printf "%b" "
Error:
Expand Down Expand Up @@ -1057,7 +1057,7 @@ Please do one of the following:
rvm_error "Could not detect ruby version/name for installation, please be more specific."
false #report error

elif (( ${rvm_force_flag:-0} == 0 )) && "$rvm_scripts_path"/list strings | grep "^${selected_ruby}$" > /dev/null
elif (( ${rvm_force_flag:-0} == 0 )) && "$rvm_scripts_path"/list strings | GREP_OPTIONS="" \grep "^${selected_ruby}$" > /dev/null
then
rvm_log "Already installed ${selected_ruby}.
To reinstall use:
Expand Down
2 changes: 1 addition & 1 deletion scripts/completion
Expand Up @@ -34,7 +34,7 @@ __rvm_rubies ()

__rvm_gemsets ()
{
echo "$(rvm gemset list | \grep -v gemset 2>/dev/null)"
echo "$(rvm gemset list | GREP_OPTIONS="" \grep -v gemset 2>/dev/null)"
}

__rvm_help_pages ()
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs
Expand Up @@ -97,7 +97,7 @@ generate_rdoc()

rvm_log "( Errors will be logged to ${rvm_log_path}/$rvm_docs_ruby_string/docs.log )"

if gem list | \grep ^hanna >/dev/null 2>&1
if gem list | GREP_OPTIONS="" \grep ^hanna >/dev/null 2>&1
then

hanna -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" --inline-source --line-numbers --fmt=html > /dev/null 2>> "${rvm_log_path}/$rvm_docs_ruby_string/docs.log"
Expand Down
10 changes: 5 additions & 5 deletions scripts/external
Expand Up @@ -10,7 +10,7 @@ external_automount()
)
}

external_grep_existing()
external_GREP_OPTIONS="" \grep_existing()
{
typeset IFS
typeset -a existing
Expand All @@ -27,7 +27,7 @@ external_grep_existing()
: existing:${existing[@]}:
if (( ${#existing[@]} > 0 ))
then
grep -vE "${existing[@]}" -
GREP_OPTIONS="" \grep -vE "${existing[@]}" -
else
cat -
fi
Expand All @@ -48,7 +48,7 @@ external_mount_uniq()
then
"${ruby_path}" -rrbconfig -e "puts RbConfig::CONFIG['prefix']" 2>/dev/null
fi
done | sort -u | external_grep_existing
done | sort -u | external_GREP_OPTIONS="" \grep_existing
) )

if (( ${#ruby_paths[@]} == 0 ))
Expand All @@ -67,11 +67,11 @@ external_mount()
{
typeset path ruby_path prefix_path
path="$1"
if [[ ! -d "${path}" && -x "${path}" ]] && "${path}" --version | grep rub >/dev/null
if [[ ! -d "${path}" && -x "${path}" ]] && "${path}" --version | GREP_OPTIONS="" \grep rub >/dev/null
then
ruby_path="${path}"
prefix_path="$("${path}" -rrbconfig -e "puts RbConfig::CONFIG['prefix']")"
elif [[ -d "${path}" && -x "${path}/bin/ruby" ]] && "${path}/bin/ruby" --version | grep rub >/dev/null
elif [[ -d "${path}" && -x "${path}/bin/ruby" ]] && "${path}/bin/ruby" --version | GREP_OPTIONS="" \grep rub >/dev/null
then
ruby_path="${path}/bin/ruby"
prefix_path="$("${ruby_path}" -rrbconfig -e "puts RbConfig::CONFIG['prefix']")"
Expand Down
1 change: 0 additions & 1 deletion scripts/extras/rails
Expand Up @@ -26,7 +26,6 @@

enable_extendglob() {
if [[ -n "${ZSH_VERSION:-}" ]] ; then
emulate -L zsh
setopt extendedglob
else
if [[ -n "${BASH_VERSION:-}" ]] ; then
Expand Down
4 changes: 2 additions & 2 deletions scripts/functions/build
Expand Up @@ -28,7 +28,7 @@ __rvm_compiler_is_llvm()
typeset compiler
if compiler=$(__rvm_found_compiler)
then
$compiler --version | grep -i llvm >/dev/null
$compiler --version | GREP_OPTIONS="" \grep -i llvm >/dev/null
else
return 1
fi
Expand Down Expand Up @@ -135,7 +135,7 @@ __rvm_mri_rubies()
for _ruby in $( find $rvm_rubies_path/ -maxdepth 1 -mindepth 1 -type d -not -type l )
do
printf "%b" "${_ruby##*/}\n"
done | grep -E "$versions"
done | GREP_OPTIONS="" \grep -E "$versions"
}

# Returns the first mri compatible (partly) ruby for use
Expand Down
1 change: 0 additions & 1 deletion scripts/functions/cleanup
Expand Up @@ -12,7 +12,6 @@ __rvm_rm_rf()
#NOTE: RVM Requires extended globbing shell feature turned on.
if [[ -n "${ZSH_VERSION:-}" ]]
then
emulate -L zsh # setopts should only be local
setopt extendedglob
else
if [[ -n "${BASH_VERSION:-}" ]]
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/developer
Expand Up @@ -35,7 +35,7 @@ rvmselect()

ln -fs "${rvm_path}.${name}" "${rvm_path}"

ls -al "$(basename "${rvm_path}")" | grep "$rvm_path" | awk '/rvm/{print "=> "$NF}'
ls -al "$(basename "${rvm_path}")" | GREP_OPTIONS="" \grep "$rvm_path" | awk '/rvm/{print "=> "$NF}'

return $?
}
2 changes: 1 addition & 1 deletion scripts/functions/env
Expand Up @@ -45,7 +45,7 @@ __rvm_cleanse_variables()
# Add bin path if not present
__rvm_conditionally_add_bin_path()
{
if printf "%b" "${PATH//:/ }" | \grep -vF "${rvm_bin_path}" >/dev/null 2>&1
if printf "%b" "${PATH//:/ }" | GREP_OPTIONS="" \grep -vF "${rvm_bin_path}" >/dev/null 2>&1
then
case "${rvm_ruby_string:-"system"}" in
system)
Expand Down
9 changes: 4 additions & 5 deletions scripts/functions/environment
Expand Up @@ -88,7 +88,7 @@ __rvm_ensure_has_environment_files()
\mkdir -p "$rvm_environments_path"
fi

if [[ ! -s "$file_name" ]] || ! grep 'rvm_env_string=' "$file_name" >/dev/null
if [[ ! -s "$file_name" ]] || ! GREP_OPTIONS="" \grep 'rvm_env_string=' "$file_name" >/dev/null
then
rm -f "$file_name"
printf "%b" \
Expand Down Expand Up @@ -241,17 +241,17 @@ __rvm_setup()
then
export rvm_zsh_clobber rvm_zsh_nomatch
# Set clobber for zsh users, for compatibility with bash's append operator ( >> file ) behavior
if setopt | \grep -s '^noclobber$' >/dev/null 2>&1
if setopt | GREP_OPTIONS="" \grep -s '^noclobber$' >/dev/null 2>&1
then rvm_zsh_clobber=0
else rvm_zsh_clobber=1
fi
setopt clobber
# Set no_nomatch so globs that don't match any files don't print out a warning
if setopt | \grep -s '^nonomatch$' >/dev/null 2>&1
if setopt | GREP_OPTIONS="" \grep -s '^nonomatch$' >/dev/null 2>&1
then rvm_zsh_nomatch=0
else rvm_zsh_nomatch=1
fi
setopt no_nomatch # TODO: changing a user's options isn't polite.
setopt no_nomatch
fi
}

Expand Down Expand Up @@ -281,7 +281,6 @@ __rvm_teardown()

if [[ -n "${ZSH_VERSION:-""}" ]]
then
emulate -L zsh
# If rvm_zsh_clobber is 0 then "setopt" contained "noclobber" before rvm performed "setopt clobber".
(( rvm_zsh_clobber == 0 )) && setopt noclobber
# If rvm_zsh_nomatch is 0 then "setopt" contained "nonomatch" before rvm performed "setopt nonomatch".
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/gemset
Expand Up @@ -19,7 +19,7 @@ __rvm_current_gemset()
__rvm_using_gemset_globalcache()
{
"$rvm_scripts_path/db" "$rvm_user_path/db" \
"use_gemset_globalcache" | \grep '^true$' >/dev/null 2>&1
"use_gemset_globalcache" | GREP_OPTIONS="" \grep '^true$' >/dev/null 2>&1
return $?
}

Expand Down
6 changes: 3 additions & 3 deletions scripts/functions/group
Expand Up @@ -36,16 +36,16 @@ setup_rvm_group_users()
{
case "$(uname)" in
"Darwin")
usernames=$(dscl . -search /Users PrimaryGroupID 20 | grep PrimaryGroupID | cut -f 1)
usernames=$(dscl . -search /Users PrimaryGroupID 20 | GREP_OPTIONS="" \grep PrimaryGroupID | cut -f 1)
;;
*)
usernames=($(grep -xF -f <(cat /etc/passwd | cut -d: -f1) <(find /home -mindepth 1 -maxdepth 1 -type d | cut -d '/' -f 3)))
usernames=($(GREP_OPTIONS="" \grep -xF -f <(cat /etc/passwd | cut -d: -f1) <(find /home -mindepth 1 -maxdepth 1 -type d | cut -d '/' -f 3)))
;;
esac

for user in ${usernames[@]}
do
if ! groups "$user" | grep 'rvm' >/dev/null 2>&1
if ! groups "$user" | GREP_OPTIONS="" \grep 'rvm' >/dev/null 2>&1
then
printf "%b" "Ensuring '$user' is in group '$rvm_group_name'\n"
add_user_to_rvm_group $user
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/hooks/jruby
Expand Up @@ -4,7 +4,7 @@ export JRUBY_OPTS

jruby_ngserver_is_running()
{
ps auxww | grep '[c]om.martiansoftware.nailgun.NGServer' >/dev/null
ps auxww | GREP_OPTIONS="" \grep '[c]om.martiansoftware.nailgun.NGServer' >/dev/null
}

jruby_ngserver_start()
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/init
Expand Up @@ -13,7 +13,7 @@ __rvm_load_rvmrc()
do
if [[ -s "$_file" ]]
then
if \grep '^\s*rvm .*$' "$_file" >/dev/null 2>&1
if GREP_OPTIONS="" \grep '^\s*rvm .*$' "$_file" >/dev/null 2>&1
then
rvm_error "
$_file is for rvm settings only.
Expand Down
8 changes: 4 additions & 4 deletions scripts/functions/install
Expand Up @@ -17,7 +17,7 @@ __rvm_record_install()

\rm -f "$rvm_install_record_file.tmp"

\grep -v "^$recorded_ruby_name " < "$rvm_install_record_file" \
GREP_OPTIONS="" \grep -v "^$recorded_ruby_name " < "$rvm_install_record_file" \
> "$rvm_install_record_file.tmp"

echo "$rvm_install_command" >> "$rvm_install_record_file.tmp"
Expand All @@ -41,7 +41,7 @@ __rvm_remove_install_record()

\mv "$rvm_install_record_file" "$rvm_install_record_file.tmp"

\grep -v "^$recorded_ruby_name " < "$rvm_install_record_file.tmp" \
GREP_OPTIONS="" \grep -v "^$recorded_ruby_name " < "$rvm_install_record_file.tmp" \
> "$rvm_install_record_file"

\rm -f "$rvm_install_record_file.tmp"
Expand All @@ -62,9 +62,9 @@ __rvm_recorded_install_command()
recorded_ruby_match="^$recorded_ruby_name "

if [[ -s "$rvm_user_path/installs" ]] \
&& \grep "$recorded_ruby_match" "$rvm_user_path/installs" >/dev/null 2>&1 ; then
&& GREP_OPTIONS="" \grep "$recorded_ruby_match" "$rvm_user_path/installs" >/dev/null 2>&1 ; then

\grep "$recorded_ruby_match" < "$rvm_user_path/installs" | head -n1
GREP_OPTIONS="" \grep "$recorded_ruby_match" < "$rvm_user_path/installs" | head -n1

else
return 1
Expand Down

0 comments on commit d21fac7

Please sign in to comment.