Skip to content

Commit

Permalink
Correct restrict basename argument count
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutto committed Aug 16, 2010
1 parent 156a25b commit 0f730fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/list
Original file line number Diff line number Diff line change
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 -n 1 | 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 -- 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

0 comments on commit 0f730fc

Please sign in to comment.