Skip to content

Commit

Permalink
And lo we fight the evil alias Hydra wherever a head may rear.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Aug 21, 2010
1 parent 83c493a commit d161837
Show file tree
Hide file tree
Showing 21 changed files with 67 additions and 67 deletions.
4 changes: 2 additions & 2 deletions binscripts/rvm
Expand Up @@ -3,7 +3,7 @@
if [[ -z "$rvm_ignore_rvmrc" ]]; then
for rvmrc in /etc/rvmrc "$HOME/.rvmrc" ; do
if [[ -f "$rvmrc" ]] ; then
if grep -q '^\s*rvm .*$' "$rvmrc" ; then
if \grep -q '^\s*rvm .*$' "$rvmrc" ; then
printf "\nError: $rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
exit 1
else
Expand Down Expand Up @@ -34,7 +34,7 @@ if [[ -z "$rvm_prefix" ]] ; then
fi

# Fix rvm_prefix changes.
echo "$rvm_prefix" | grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]
echo "$rvm_prefix" | \grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]
rvm_prefix_needs_trailing_slash="$?"
if [[ "$rvm_prefix" = "/usr/local" || "$rvm_prefix_needs_trailing_slash" = "0" ]]; then
rvm_prefix="$rvm_prefix/"
Expand Down
2 changes: 1 addition & 1 deletion binscripts/rvm-shell
Expand Up @@ -11,7 +11,7 @@ __rvm_shell_lookup_script() {
}

# If the first argument isn't -c, remove it and set it to the ruby string value.
if [[ -n "$1" && ! -f "$1" && -n "$(echo "$1" | grep -v '^-')" ]]; then
if [[ -n "$1" && ! -f "$1" && -n "$(echo "$1" | \grep -v '^-')" ]]; then
rvm_shell_ruby_string="$1"
shift
fi
Expand Down
2 changes: 1 addition & 1 deletion contrib/install-system-wide
Expand Up @@ -30,7 +30,7 @@ rvm_path="${rvm_path:-"/usr/local/rvm"}"
export rvm_selfcontained=0

rvm_group_name="${rvm_group_name:-"rvm"}"
if cat /etc/group | cut -d: -f1 | grep -q "^${rvm_group_name}$"; then
if cat /etc/group | cut -d: -f1 | \grep -q "^${rvm_group_name}$"; then
echo "Group exists, proceeding with installation."
else
echo "Creating the group '$rvm_group_name'"
Expand Down
2 changes: 1 addition & 1 deletion docs/rebuild.sh
Expand Up @@ -32,7 +32,7 @@ find ${rvm_docs_src_dir} -type f -name *.txt | while read rvm_manpage_file; do
# of the source file.

# it should be something like 'RVM(1)'
rvm_manpage_name_full="$(cat ${rvm_manpage_file} | head -n 3 | grep -o '^[^(]*[(][^)]*[)]$')"
rvm_manpage_name_full="$(cat ${rvm_manpage_file} | head -n 3 | \grep -o '^[^(]*[(][^)]*[)]$')"

if [[ -z "${rvm_manpage_name_full}" ]]; then
echo "Unable to detect manpage name, stopping build process..." 1>&2
Expand Down
2 changes: 1 addition & 1 deletion scripts/base
Expand Up @@ -4,7 +4,7 @@
# Load the general scripts.
# Use rvm_base_except="" to override the except.
for script_name in initialize utility selector; do
if echo "$rvm_base_except" | grep -vq "$script_name" ; then
if echo "$rvm_base_except" | \grep -vq "$script_name" ; then
source $rvm_scripts_path/$script_name
fi
done; unset script_name rvm_base_except
Expand Down
6 changes: 3 additions & 3 deletions scripts/cli
Expand Up @@ -23,7 +23,7 @@ __rvm_parse_args() {
# Otherwise this file gets big rather fast.
#echo "$@" >> $HOME/.rvm_history

if echo "$@" | grep -q 'trace' ; then echo "$@" ; __rvm_version ; fi
if echo "$@" | \grep -q 'trace' ; then echo "$@" ; __rvm_version ; fi

while [[ $# -gt 0 ]] ; do
rvm_token="$1" ; shift
Expand Down Expand Up @@ -80,7 +80,7 @@ __rvm_parse_args() {
rvm_use_flag=1
rvm_ruby_args="$@" ; shift
rvm_gemset_name="$1" ; shift
if [[ ! -z "$(echo $rvm_gemset_name | grep $rvm_gemset_separator)" ]] ; then
if [[ ! -z "$(echo $rvm_gemset_name | \grep $rvm_gemset_separator)" ]] ; then
rvm_ruby_string=$(echo $rvm_gemset_name | sed 's/\(.*\)'${rvm_gemset_separator}'.*/\1/')
rvm_gemset_name=$(echo $rvm_gemset_name | sed 's/.*'${rvm_gemset_separator}'\(.*\)/\1/')
if [[ "$rvm_ruby_string" != "$rvm_gemset_name" ]] ; then
Expand All @@ -92,7 +92,7 @@ __rvm_parse_args() {
rvm_delete_flag=1
rvm_ruby_args="$@" ; shift
rvm_gemset_name="$1"; shift
if [[ ! -z "$(echo $rvm_gemset_name | grep $rvm_gemset_separator)" ]] ; then
if [[ ! -z "$(echo $rvm_gemset_name | \grep $rvm_gemset_separator)" ]] ; then
rvm_ruby_string=$(echo $rvm_gemset_name | sed 's/\(.*\)'${rvm_gemset_separator}'.*/\1/')
rvm_gemset_name=$(echo $rvm_gemset_name | sed 's/.*'${rvm_gemset_separator}'\(.*\)/\1/')
if [[ "$rvm_ruby_string" != "$rvm_gemset_name" ]] ; then
Expand Down
4 changes: 2 additions & 2 deletions scripts/completion
@@ -1,6 +1,6 @@
# bash completion for Ruby Version Manager (RVM)

__rvm_comp()
__rvm_comp()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=($(compgen -W "$1" -- "$cur"))
Expand Down Expand Up @@ -30,7 +30,7 @@ __rvm_rubies ()

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

_rvm_commands ()
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs
Expand Up @@ -48,7 +48,7 @@ generate_rdoc() {
\rm -rf "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/"
$rvm_scripts_path/log "info" "Generating rdoc documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
$rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
if gem list | grep -q ^hanna ; then
if gem list | \grep -q ^hanna ; then
hanna -o $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type --inline-source --line-numbers --fmt=html > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
else
rdoc -a -o $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
Expand Down
8 changes: 4 additions & 4 deletions scripts/environment-convertor
Expand Up @@ -30,14 +30,14 @@ contents_of_environment_file() {
}

convert_to_shell() {
convert_path_to_fish "$(contents_of_environment_file | grep '^export PATH=')"
convert_path_to_fish "$(contents_of_environment_file | \grep '^export PATH=')"
while read -r shell_line; do
if echo "$shell_line" | grep -q '^unset '; then
if echo "$shell_line" | \grep -q '^unset '; then
echo "$shell_line" | convert_unset_to_fish
else
echo "$shell_line" | convert_exports_to_fish
fi
done < <(contents_of_environment_file | grep -v '^export [^=]*$' | grep -v '^export PATH=')
done < <(contents_of_environment_file | \grep -v '^export [^=]*$' | \grep -v '^export PATH=')
unset shell_line
}

Expand All @@ -57,4 +57,4 @@ if [[ "$(__rvm_environment_identifier)" != "$environment_name" ]]; then
__rvm_become "$environment_name" || exit 1
fi

convert_to_shell
convert_to_shell
4 changes: 2 additions & 2 deletions scripts/gemsets
Expand Up @@ -16,7 +16,7 @@ usage() {
gemset_update() {
if [[ -z "$rvm_ruby_strings" ]]; then
$rvm_scripts_path/log "info" "Running gem update for all rubies and gemsets."
rvm_ruby_strings="$(\ls "$rvm_gems_path" | grep -v '^\(doc\|cache\|@\|system\)' | \tr '\n' ',')"
rvm_ruby_strings="$(\ls "$rvm_gems_path" | \grep -v '^\(doc\|cache\|@\|system\)' | \tr '\n' ',')"
else
$rvm_scripts_path/log "info" "Running gem update for the specified rubies."
fi
Expand Down Expand Up @@ -375,7 +375,7 @@ gem_install() {
# Output the user's current gem directory.
gemset_info() {
if [[ "$rvm_user_flag" -eq 1 ]] ; then
echo $(rvm system ; gem env | grep "\- $HOME" | awk '{print $NF}')
echo $(rvm system ; gem env | \grep "\- $HOME" | awk '{print $NF}')
elif [[ "$rvm_system_flag" -eq 1 ]] ; then
echo $(rvm system ; gem env $action system)
elif [[ ! -z "$rvm_ruby_string" ]] ; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/info
Expand Up @@ -85,7 +85,7 @@ info_debug() {

for file_name in $(echo $rc_files) ; do
if [[ -s "$file_name" ]] ; then
rvm_info="$rvm_info\n$( "$file_name:\n$(grep 'rvm' $file_name 2>/dev/null)" )"
rvm_info="$rvm_info\n$( "$file_name:\n$(\grep 'rvm' $file_name 2>/dev/null)" )"
fi
done

Expand Down
12 changes: 6 additions & 6 deletions scripts/install
Expand Up @@ -47,7 +47,7 @@ spinner() {
command -v perl > /dev/null 2>&1 && perl -e 'sleep 0.5'
}

if echo "$*" | grep -q 'trace' ; then echo "$*" ; env | grep '^rvm_' ; set -x ; fi
if echo "$*" | \grep -q 'trace' ; then echo "$*" ; env | \grep '^rvm_' ; set -x ; fi

while [[ $# -gt 0 ]] ; do
token="$1" ; shift
Expand All @@ -72,7 +72,7 @@ if [[ -z "$rvm_path" ]] ; then rvm_path="${rvm_prefix}rvm" ; fi

source scripts/initialize

if grep -q 'scripts/rvm' $HOME/.bash* 2>/dev/null || grep -q 'scripts/rvm' $HOME/.zsh* 2>/dev/null; then
if \grep -q 'scripts/rvm' $HOME/.bash* 2>/dev/null || \grep -q 'scripts/rvm' $HOME/.zsh* 2>/dev/null; then
if [[ -d "$rvm_path" ]] && [[ -s "${rvm_path}/scripts/rvm" ]] ; then
export upgrade_flag=1
else
Expand Down Expand Up @@ -178,12 +178,12 @@ if [[ -n "$rvm_auto_flag" ]] ; then
for rcfile in $(echo $rvm_rc_files) ; do
if [[ ! -f $rcfile ]] ; then \touch $rcfile ; fi
if [[ -s "$HOME/.profile" ]] ; then
if ! grep -q '.profile' "$rcfile" ; then
if ! \grep -q '.profile' "$rcfile" ; then
echo " Adding 'if [[ -s \$HOME/.profile ]] ; then source \$HOME ; fi' to $rcfile."
printf "\n# rvm-install added line:\nif [[ -s \$HOME/.profile ]] ; then source \$HOME/.profile ; fi\n" >> $rcfile
fi
fi
if ! grep -q "scripts\/rvm" "$rcfile" ; then
if ! \grep -q "scripts\/rvm" "$rcfile" ; then
echo " Adding 'if [[ -s $rvm_scripts_path/rvm ]] ; then source $rvm_scripts_path/rvm ; fi' to $rcfile."
printf "\n# rvm-install added:\nif [[ -s $rvm_scripts_path/rvm ]] ; then source $rvm_scripts_path/rvm ; fi\n" >> $rcfile
fi
Expand Down Expand Up @@ -275,7 +275,7 @@ done

# Move from legacy defaults to the new, alias based system.
if [[ -s "$rvm_config_path/default" ]]; then
original_version="$(basename "$(grep GEM_HOME "$rvm_config_path/default" | awk -F"'" '{print $2}' | sed "s#\%#${rvm_gemset_separator}#")")"
original_version="$(basename "$(\grep GEM_HOME "$rvm_config_path/default" | awk -F"'" '{print $2}' | sed "s#\%#${rvm_gemset_separator}#")")"
if [[ -n "$original_version" ]]; then
$rvm_scripts_path/alias create default "$original_version" &> /dev/null
fi
Expand Down Expand Up @@ -335,7 +335,7 @@ else
printf "\n placing all non-interactive items in the .bashrc, including the 'source' line above"
printf "\n3) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
fi
if [[ -s "$HOME/.bashrc" ]] && grep -q '&& return' "$HOME/.bashrc" ; then
if [[ -s "$HOME/.bashrc" ]] && \grep -q '&& return' "$HOME/.bashrc" ; then
printf "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc."
printf "\n This means that if you see '[ -z \"\$PS1\" ] && return' then you must change this line to:"
printf "\n if [[ -n \"\$PS1\" ]] ; then"
Expand Down
10 changes: 5 additions & 5 deletions scripts/list
Expand Up @@ -35,7 +35,7 @@ list_gemsets() {
done ; unset version

if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then
version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n1 | awk -F"'" '{print $2}' | xargs basename --)
version=$(\grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n1 | awk -F"'" '{print $2}' | xargs basename --)
if [[ ! -z "$version" ]] ; then
printf "\n\nDefault Ruby (for new shells)\n"
string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | \tr "\n" ' ')]"
Expand Down Expand Up @@ -81,7 +81,7 @@ list_strings() {
# This is meant to be used with scripting.
list_gemset_strings() {
local all_rubies="$(list_strings)"
for gemset in $(\ls $rvm_gems_path/ 2>/dev/null | xargs -n1 basename -- | grep -v '^\(@\|doc$\|cache$\|system$\)' | sort); do
for gemset in $(\ls $rvm_gems_path/ 2>/dev/null | xargs -n1 basename -- | \grep -v '^\(@\|doc$\|cache$\|system$\)' | sort); do
local ruby_name="$(echo "$gemset" | awk -F$rvm_gemset_separator '{print $1}')"
[[ "$all_rubies" != *"$ruby_name"* ]] && continue
echo "$gemset"
Expand Down Expand Up @@ -111,12 +111,12 @@ list_rubies_strings() {
}

list_rubies() {

if [[ "$1" = "strings" ]]; then
list_rubies_strings
return 0
fi

echo

current_ruby="$(__rvm_environment_identifier | awk -F"$rvm_gemset_separator" '{print $1}')"
Expand All @@ -140,7 +140,7 @@ list_rubies() {
done ; unset version

if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then
version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n 1 | awk -F"'" '{print $2}' | xargs basename --)
version=$(\grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n 1 | awk -F"'" '{print $2}' | xargs basename --)
if [[ ! -z "$version" ]] ; then
printf "\n\nDefault Ruby (for new shells)\n"
string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | \tr "\n" ' ')]"
Expand Down
10 changes: 5 additions & 5 deletions scripts/maglev
Expand Up @@ -88,7 +88,7 @@ case "$system" in
Solaris-x86)
# TODO: figure memory needs for Solaris-x86
# Investigate project.max-shm-memory
totalMemMB="`/usr/sbin/prtconf | grep Memory | cut -f3 -d' '`"
totalMemMB="`/usr/sbin/prtconf | \grep Memory | cut -f3 -d' '`"
totalMem=$(($totalMemMB * 1048576))
shmmax=$(($totalMem / 4))
shmall=$(($shmmax / 4096))
Expand Down Expand Up @@ -144,7 +144,7 @@ fi

# At this point, shared memory settings contain the values we want,
# put them in sysctl.conf so they are preserved.
if [[ ! -f /etc/sysctl.conf ]] || [[ "$(grep -sc "kern.*.shm" /etc/sysctl.conf)" -eq 0 ]] ; then
if [[ ! -f /etc/sysctl.conf ]] || [[ "$(\grep -sc "kern.*.shm" /etc/sysctl.conf)" -eq 0 ]] ; then
case "$system" in
Linux)
echo "# kernel.shm* settings added by MagLev installation" > /tmp/sysctl.conf.$$
Expand Down Expand Up @@ -177,17 +177,17 @@ if [[ ! -f /etc/sysctl.conf ]] || [[ "$(grep -sc "kern.*.shm" /etc/sysctl.conf)"
else
$rvm_scripts_path/log "info" "The following shared memory settings already exist in /etc/sysctl.conf"
echo "To change them, remove the following lines from /etc/sysctl.conf and rerun this script"
grep "kern.*.shm" /etc/sysctl.conf
\grep "kern.*.shm" /etc/sysctl.conf
fi

# Now setup for NetLDI in case we ever need it.
$rvm_scripts_path/log "info" "Setting up GemStone netldi service port"
if [[ $(grep -sc "^gs64ldi" /etc/services) -eq 0 ]]; then
if [[ $(\grep -sc "^gs64ldi" /etc/services) -eq 0 ]]; then
echo '[[Info]] Adding "gs64ldi 50378/tcp" to /etc/services'
sudo bash -c 'echo "gs64ldi 50378/tcp # Gemstone netldi" >> /etc/services'
else
$rvm_scripts_path/log "info" "GemStone netldi service port is already set in /etc/services"
echo "To change it, remove the following line from /etc/services and rerun this script"
grep "^gs64ldi" /etc/services
\grep "^gs64ldi" /etc/services
fi

6 changes: 3 additions & 3 deletions scripts/manage
Expand Up @@ -43,7 +43,7 @@ __rvm_apply_patches() {
for patch_name in $(__rvm_current_patch_names | __rvm_strip); do
patch_level="1"
# If set, extract the patch level from the patch name.
if echo "$patch_name" | grep -q "$patch_level_seperator"; then
if echo "$patch_name" | \grep -q "$patch_level_seperator"; then
patch_level="$(echo "$patch_name" | awk -F"$patch_level_seperator" '{print $2}')"
patch_name="$(echo "$patch_name" | awk -F"$patch_level_seperator" '{print $1}')"
fi
Expand Down Expand Up @@ -470,7 +470,7 @@ RubyWrapper

if [[ -n "$rvm_head_flag" ]] ; then
builtin cd $rvm_ruby_src_path
rvm_gemstone_package_file="GemStone-$(grep ^GEMSTONE version.txt | cut -f2 -d-).$(uname -sm | \tr ' ' '-')"
rvm_gemstone_package_file="GemStone-$(\grep ^GEMSTONE version.txt | cut -f2 -d-).$(uname -sm | \tr ' ' '-')"
rvm_gemstone_url="${rvm_gemstone_url:-"$maglev_url/${rvm_gemstone_package_file}.${rvm_archive_extension}"}"
fi

Expand Down Expand Up @@ -1062,7 +1062,7 @@ __rvm_rubygems_setup() {
directory_name="$rvm_ruby_home/lib/ruby/gems"
version_number="${rvm_release_version}.${rvm_major_version}"
if [[ "$version_number" == "." ]]; then
version_number="$(\ls "$directory_name" | grep '^[[:digit:]].[[:digit:]]\(.[[:digit:]]\)\?' | head -n1)"
version_number="$(\ls "$directory_name" | \grep '^[[:digit:]].[[:digit:]]\(.[[:digit:]]\)\?' | head -n1)"
if [[ -n "$version_number" ]]; then
ruby_lib_gem_path="${directory_name}/${version_number}"
else
Expand Down
6 changes: 3 additions & 3 deletions scripts/rvm
Expand Up @@ -12,7 +12,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
if [[ -z "$rvm_ignore_rvmrc" ]]; then
for rvmrc in /etc/rvmrc $HOME/.rvmrc ; do
if [[ -f "$rvmrc" ]] ; then
if grep -q '^\s*rvm .*$' $rvmrc ; then
if \grep -q '^\s*rvm .*$' $rvmrc ; then
printf "\nError: $rvmrc is for rvm settings only.\nrvm CLI may NOT be called from within $rvmrc. \nSkipping the loading of $rvmrc"
return 1
else
Expand Down Expand Up @@ -40,7 +40,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
fi

# Fix rvm_prefix changes.
echo "$rvm_prefix" | grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]
echo "$rvm_prefix" | \grep -vq '\(\/\|\.\)$' && [[ -d "$rvm_prefix/rvm/scripts" ]]
rvm_prefix_needs_trailing_slash="$?"
if [[ "$rvm_prefix" = "/usr/local" || "$rvm_prefix_needs_trailing_slash" = "0" ]]; then
rvm_prefix="$rvm_prefix/"
Expand Down Expand Up @@ -68,7 +68,7 @@ if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then

alias rvm-restart="source '${rvm_path}/scripts/rvm'"

if ! command -v ruby >/dev/null 2>&1 || command -v ruby | grep -v rvm >/dev/null ; then
if ! command -v ruby >/dev/null 2>&1 || command -v ruby | \grep -v rvm >/dev/null ; then
[[ -s "$rvm_environments_path/default" ]] && source "$rvm_environments_path/default"
fi
else
Expand Down
4 changes: 2 additions & 2 deletions scripts/selector
Expand Up @@ -229,7 +229,7 @@ __rvm_use() {
new_path="$(echo $PATH | \tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)"
new_path="$rvm_bin_path:$new_path"
if [[ -s $rvm_config_path/system ]] ; then
grep "MY_RUBY_HOME='$rvm_rubies_path" "$rvm_config_path/system" > /dev/null
\grep "MY_RUBY_HOME='$rvm_rubies_path" "$rvm_config_path/system" > /dev/null
if [[ $? -eq 0 ]] ; then
[[ -f "$rvm_config_path/system" ]] && \rm -f $rvm_config_path/system # 'system' should *not* point to an rvm ruby.
else
Expand Down Expand Up @@ -559,7 +559,7 @@ __rvm_gemset_select() {

# Ensure that the ruby gem home exists.
\mkdir -p "$rvm_ruby_gem_home"
if [[ -n "$rvm_ruby_gem_home" ]] && echo "$rvm_ruby_gem_home" | grep -q 'rvm'; then
if [[ -n "$rvm_ruby_gem_home" ]] && echo "$rvm_ruby_gem_home" | \grep -q 'rvm'; then
if __rvm_using_gemset_globalcache && [[ ! -L "$rvm_ruby_gem_home/cache" ]]; then
mv "$rvm_ruby_gem_home/cache/"*.gem "$rvm_gems_cache_path/" 2>/dev/null
\rm -rf "$rvm_ruby_gem_home/cache"
Expand Down
2 changes: 1 addition & 1 deletion scripts/set
Expand Up @@ -162,7 +162,7 @@ action="$1";
[[ "$#" -gt 0 ]] && shift
args="$*"

if [[ "$action" == "ruby" ]] && echo "$args" | grep -q "^'--[^[:space:]]*'$" ; then
if [[ "$action" == "ruby" ]] && echo "$args" | \grep -q "^'--[^[:space:]]*'$" ; then
$rvm_scripts_path/log "warn" "You called rvm ruby with the arguments $args which look like use options."
$rvm_scripts_path/log "warn" "Please note that 'rvm ruby' invokes set operations instead."
fi
Expand Down
6 changes: 3 additions & 3 deletions scripts/snapshot
Expand Up @@ -63,8 +63,8 @@ snapshot_save() {
comm -2 -3 "$snapshot_ruby_name_file" "$snapshot_alias_name_file" > "$snapshot_installable_file"
\rm -rf "$snapshot_ruby_name_file" "$snapshot_alias_name_file"

local snapshot_primary_ruby="$(cat "$snapshot_installable_file" | grep '^\(ree\|ruby-1.8.7\)' | grep -v '-head$' | sort -r | head -n1)"
local snapshot_ruby_order="$snapshot_primary_ruby $(cat "$snapshot_installable_file" | grep -v "$snapshot_primary_ruby")"
local snapshot_primary_ruby="$(cat "$snapshot_installable_file" | \grep '^\(ree\|ruby-1.8.7\)' | \grep -v '-head$' | sort -r | head -n1)"
local snapshot_ruby_order="$snapshot_primary_ruby $(cat "$snapshot_installable_file" | \grep -v "$snapshot_primary_ruby")"
for snapshot_ruby_name in $snapshot_ruby_order ; do
snapshot_install_command="$(__rvm_recorded_install_command "$snapshot_ruby_name")"
if [[ -n "$snapshot_install_command" ]]; then
Expand Down Expand Up @@ -139,7 +139,7 @@ snapshot_load() {
export rvm_create_flag=1
$rvm_scripts_path/log "info" "Setting up gemsets"
__rvm_pushpop "$snapshot_temp_path/gems"
for snapshot_gemset in $(\ls | grep '\.gems$' | sed 's/.gems$//'); do
for snapshot_gemset in $(\ls | \grep '\.gems$' | sed 's/.gems$//'); do
__rvm_become "$snapshot_gemset"
result="$?"
__error_on_result "$result" "Error becoming '$snapshot_gemset'" && return "$result"
Expand Down

0 comments on commit d161837

Please sign in to comment.