commit:     f59ab2fc422dd6c8c2a07c4a89d3fae3f6aa2c69
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 31 17:55:57 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Aug 31 17:55:57 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f59ab2fc

safer quoting for clst_make_conf and proper quoting for "USE=${USE} bindist"

prevent possible issues with spaces in $clst_make_conf

prevent ${USE} being expanded by bash and causing the sed removal of
USE="${USE} bindist"
to fail

 targets/support/chroot-functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 14a2e35..9066642 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -269,7 +269,7 @@ run_merge() {
        export CONFIG_PROTECT="-*"
 
        # Set bindist USE flag if clst_BINDIST is set
-       [ -e ${clst_make_conf} ] && [ -n "${clst_BINDIST}" ] && echo 
"USE=\"\${USE} bindist\"" >> ${clst_make_conf}
+       [ -e "${clst_make_conf}" ] && [ -n "${clst_BINDIST}" ] && echo 
"USE=\"\${USE} bindist\"" >> "${clst_make_conf}"
 
        if [ -n "${clst_VERBOSE}" ]
        then
@@ -289,7 +289,7 @@ run_merge() {
        emerge ${clst_myemergeopts} $@ || exit 1
 
        # Clean-up USE again
-       sed -i "/USE=\"${USE} bindist\"/d" ${clst_make_conf}
+       sed -i '/USE="${USE} bindist"/d' "${clst_make_conf}"
 }
 
 show_debug() {

Reply via email to