1 |
commit: ddee4fef83539a5bc66b3c76086dd6ba2ab1f77c |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Sun Nov 25 10:33:10 2012 +0000 |
4 |
Commit: Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com> |
5 |
CommitDate: Sun Nov 25 10:33:10 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ddee4fef |
7 |
|
8 |
__sb_append_var(): Quote tr arguments to avoid filename expansion. Avoid a subshell. |
9 |
|
10 |
--- |
11 |
bin/ebuild.sh | 3 +-- |
12 |
1 files changed, 1 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/bin/ebuild.sh b/bin/ebuild.sh |
15 |
index d83789c..80bdd80 100755 |
16 |
--- a/bin/ebuild.sh |
17 |
+++ b/bin/ebuild.sh |
18 |
@@ -113,8 +113,7 @@ unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE |
19 |
__sb_append_var() { |
20 |
local _v=$1 ; shift |
21 |
local var="SANDBOX_${_v}" |
22 |
- [[ -z $1 || -n $2 ]] && die "Usage: add$(echo ${_v} | \ |
23 |
- LC_ALL=C tr [:upper:] [:lower:]) <colon-delimited list of paths>" |
24 |
+ [[ -z $1 || -n $2 ]] && die "Usage: add$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${_v}") <colon-delimited list of paths>" |
25 |
export ${var}="${!var:+${!var}:}$1" |
26 |
} |
27 |
# bash-4 version: |