diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2015-09-04 14:22:27 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-07 16:10:46 +0100 |
commit | c66d7d85b7225be8c838449324d506565dd0081d (patch) | |
tree | 6caf926cfe7c168aa87dd689e28d68b150b54a4f /scripts | |
parent | 7d08d2d5c0ae686e3bb8732ea82f30fd189b1cd8 (diff) | |
download | openembedded-core-c66d7d85b7225be8c838449324d506565dd0081d.tar.gz openembedded-core-c66d7d85b7225be8c838449324d506565dd0081d.tar.bz2 openembedded-core-c66d7d85b7225be8c838449324d506565dd0081d.zip |
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.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/postinst-intercepts/postinst_intercept | 2 |
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 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 |