Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] ruby-fakegem.eclass: Remove completely unnecessary 'eval ls'
Date: Thu, 23 Feb 2017 18:35:07
Message-Id: 20170223183447.5714-1-mgorny@gentoo.org
1 Filename expansion is performed when the variable is referenced unquoted
2 already. There is really no need to call 'ls' on top of that, and even
3 less reason to wrap it all in 'eval'.
4 ---
5 eclass/ruby-fakegem.eclass | 5 ++---
6 1 file changed, 2 insertions(+), 3 deletions(-)
7
8 diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
9 index 2fdbf6977707..1f740e8cb9d0 100644
10 --- a/eclass/ruby-fakegem.eclass
11 +++ b/eclass/ruby-fakegem.eclass
12 @@ -522,9 +522,8 @@ all_fakegem_install() {
13
14 if [[ -d "${bindir}" ]]; then
15 pushd "${bindir}" &>/dev/null || die
16 - local binaries=$(eval ls ${RUBY_FAKEGEM_BINWRAP})
17 - for binary in $binaries; do
18 - ruby_fakegem_binwrapper $binary
19 + for binary in ${RUBY_FAKEGEM_BINWRAP}; do
20 + ruby_fakegem_binwrapper "${binary}"
21 done
22 popd &>/dev/null || die
23 fi
24 --
25 2.11.1