aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Roederer <S.Roederer@colvistec.de>2023-05-11 12:42:12 +0200
committerChristian Lamparter <chunkeey@gmail.com>2023-05-27 21:32:47 +0200
commit80a99d9cf70e5295516ec66036c8e6bbbfc8e9ee (patch)
treebd80509d60bf3a44799974f18b07505c4dbde414
parent30fca5413b5f4a3db8ba55c6d1a11db2a5337cb4 (diff)
downloadupstream-80a99d9cf70e5295516ec66036c8e6bbbfc8e9ee.tar.gz
upstream-80a99d9cf70e5295516ec66036c8e6bbbfc8e9ee.tar.bz2
upstream-80a99d9cf70e5295516ec66036c8e6bbbfc8e9ee.zip
build: escape whitespaces in VERSION_DIST for Netgear images
Prevents subshell commands from failing to parse options when having defined a whitespace in the VERSION_DIST. As the called resulting images unlikely will handle whitespace correctly, we replace them by "-". Signed-off-by: Sven Roederer <S.Roederer@colvistec.de> (cherry picked from commit 4071398b13aeee873cb5a48b00b6c90074763d5f)
-rw-r--r--include/image-commands.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 402e3d71ed..604b419b68 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -378,7 +378,7 @@ endef
define Build/netgear-dni
$(STAGING_DIR_HOST)/bin/mkdniimg \
- -B $(NETGEAR_BOARD_ID) -v $(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \
+ -B $(NETGEAR_BOARD_ID) -v $(shell cat $(VERSION_DIST)| sed -e 's/[[:space:]]/-/g').$(firstword $(subst -, ,$(REVISION))) \
$(if $(NETGEAR_HW_ID),-H $(NETGEAR_HW_ID)) \
-r "$(1)" \
-i $@ -o $@.new
@@ -391,7 +391,7 @@ define Build/netgear-encrypted-factory
--output-file $@ \
--model $(NETGEAR_ENC_MODEL) \
--region $(NETGEAR_ENC_REGION) \
- --version V1.0.0.0.$(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \
+ --version V1.0.0.0.$(shell cat $(VERSION_DIST)| sed -e 's/[[:space:]]/-/g').$(firstword $(subst -, ,$(REVISION))) \
--encryption-block-size 0x20000 \
--openssl-bin "$(STAGING_DIR_HOST)/bin/openssl" \
--key 6865392d342b4d212964363d6d7e7765312c7132613364316e26322a5a5e2538 \