[source] imagebuilder: properly escape single quotes in device titles

LEDE Commits lede-commits at lists.infradead.org
Thu Jan 26 01:17:03 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/dfe77be01fb16178efc43350c431f998a3b65ff1

commit dfe77be01fb16178efc43350c431f998a3b65ff1
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Thu Jan 26 10:13:23 2017 +0100

    imagebuilder: properly escape single quotes in device titles
    
    The name "Plat'Home OpenBlocks AX3" causes the imagebuilders "make info"
    command to fail with:
    
        bash: -c: line 0: syntax error near unexpected token `('
        bash: -c: line 0: `echo;  [...]'
        Makefile:99: recipe for target '_call_info' failed
    
    Properly escape single quotes to avoid breaking the echo commands.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 target/imagebuilder/files/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 493012f..af633b2 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -74,7 +74,7 @@ include $(INCLUDE_DIR)/target.mk
 
 USER_PROFILE ?= $(firstword $(PROFILE_NAMES))
 PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
-	echo '$(patsubst DEVICE_%,%,$(p)):'; $(if $($(p)_NAME),echo '    $($(p)_NAME)'; ) echo '    Packages: $($(p)_PACKAGES)'; \
+	echo '$(patsubst DEVICE_%,%,$(p)):'; $(if $($(p)_NAME),echo '    $(subst ','"'"',$($(p)_NAME))'; ) echo '    Packages: $($(p)_PACKAGES)'; \
 )
 
 .profiles.mk: .targetinfo



More information about the lede-commits mailing list