From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [RFC][PATCH 2/3] postinst_intercept: allow to pass variables with spaces
Date: Fri, 4 Sep 2015 14:22:27 +0200 [thread overview]
Message-ID: <1441369348-32182-2-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <1441369348-32182-1-git-send-email-Martin.Jansa@gmail.com>
* trying to pass foo="a b" through postinst_intercept ends
with the actual script header to containing:
b
foo=a
which fails because "b" command doesn't exist.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
scripts/postinst-intercepts/postinst_intercept | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept
index a257198..b18e806 100755
--- a/scripts/postinst-intercepts/postinst_intercept
+++ b/scripts/postinst-intercepts/postinst_intercept
@@ -48,7 +48,7 @@ if [ -n "$pkgs_line" ]; then
sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script
fi
else
- for var in $@; do
+ for var in "$@"; do
sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script
done
echo "##PKGS: ${package_name} " >> $intercept_script
--
2.5.0
next prev parent reply other threads:[~2015-09-04 12:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 12:22 [RFC][PATCH 1/3] rootfs.py: Allow to override postinst-intercepts location Martin Jansa
2015-09-04 12:22 ` Martin Jansa [this message]
2015-09-04 12:22 ` [RFC][PATCH 3/3] fontcache: allow to pass extra parameters and environment to fc-cache Martin Jansa
2015-09-10 14:31 ` [PATCHv2] " Martin Jansa
2015-09-29 15:50 ` Martin Jansa
2015-10-14 14:37 ` Martin Jansa
2015-09-04 12:27 ` [RFC][dizzy][fido][master][PATCH 1/3] rootfs.py: Allow to override postinst-intercepts location Martin Jansa
2015-09-10 16:07 ` akuster808
2015-09-04 18:56 ` [RFC][PATCH] rootfs.py: show intercept script output in log.do_rootfs Martin Jansa
2015-09-15 16:04 ` [RFC][PATCH 1/3] rootfs.py: Allow to override postinst-intercepts location Joshua Lock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441369348-32182-2-git-send-email-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.