summaryrefslogtreecommitdiffstats
path: root/scripts
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-09 14:27:39 +0100
commite570b3202071d39564c872c6f2e94a78313f5a9d (patch)
treecc9837d62b2fe329eb85c424fc0226819c0666ea /scripts
parentae00b5920062679f74d8a5eb0b472a6b5c320044 (diff)
downloadpoky-e570b3202071d39564c872c6f2e94a78313f5a9d.tar.gz
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>
Diffstat (limited to 'scripts')
-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 a257198bbd..b18e806d43 100755
--- a/scripts/postinst-intercepts/postinst_intercept
+++ b/scripts/postinst-intercepts/postinst_intercept
@@ -48,7 +48,7 @@ if [ -n "$pkgs_line" ]; then
48 sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script 48 sed -i -e "s/##PKGS:.*/\0${package_name} /" $intercept_script
49 fi 49 fi
50else 50else
51 for var in $@; do 51 for var in "$@"; do
52 sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script 52 sed -i -e "\%^#\!/bin/.*sh%a $var" $intercept_script
53 done 53 done
54 echo "##PKGS: ${package_name} " >> $intercept_script 54 echo "##PKGS: ${package_name} " >> $intercept_script