From bb931159ea12556fe633b029803f6f35d62866a0 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 4 Sep 2015 14:22:27 +0200 Subject: 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 master rev: c66d7d85b7225be8c838449324d506565dd0081d) (From OE-Core rev: e1cb77476934ea0f80993df049c3708bfa33dba3) Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- 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 -- cgit v1.1