aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2015-09-04 14:22:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-19 11:51:11 +0100
commit05af103b9b9141319644cde452afbe73e4c2d226 (patch)
tree68a30fc45416e359bb0e00bd3accaf102c253628
parent2374910466d82c817d74e9098a1636b21ff779af (diff)
downloadopenembedded-core-05af103b9b9141319644cde452afbe73e4c2d226.zip
openembedded-core-05af103b9b9141319644cde452afbe73e4c2d226.tar.gz
openembedded-core-05af103b9b9141319644cde452afbe73e4c2d226.tar.bz2
postinst_intercept: allow to pass variables with spaces
* 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. (From OE-Core rev: c66d7d85b7225be8c838449324d506565dd0081d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com>
-rwxr-xr-xscripts/postinst-intercepts/postinst_intercept2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/postinst-intercepts/postinst_intercept b/scripts/postinst-intercepts/postinst_intercept
index 27c2568..517ee10 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