From 81d8d58d7e97783eb86e0b5736403089bc29734b Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Thu, 27 Jun 2019 01:37:29 +0200 Subject: [PATCH] scripts/image: only include hex version in noobs os.json if NOOBS_HEX is set Signed-off-by: Matthias Reichl --- scripts/image | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/image b/scripts/image index 8cf6690bab..de6bef2a85 100755 --- a/scripts/image +++ b/scripts/image @@ -363,6 +363,14 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then cp ${ROOT}/README* ${RELEASE_DIR}/${NOOBS_DISTRO} cp ${ROOT}/CHANGELOG ${RELEASE_DIR}/${NOOBS_DISTRO}/release_notes.txt + if [ -n "${NOOBS_HEX}" ]; then + sed -e "s%@NOOBS_HEX@%${NOOBS_HEX}%g" \ + -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json + else + sed -e "/@NOOBS_HEX@/d" \ + -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json + fi + sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \ -e "s%@PROJECT@%${DEVICE:-${PROJECT}}%g" \ -e "s%@LIBREELEC_VERSION@%${LIBREELEC_VERSION}%g" \ @@ -371,7 +379,6 @@ if [ "${1}" = "release" -o "${1}" = "mkimage" -o "${1}" = "noobs" ]; then -e "s%@DESCRIPTION@%${DESCRIPTION}%g" \ -e "s%@ROOT_PASSWORD@%${ROOT_PASSWORD}%g" \ -e "s%@NOOBS_SUPPORTED_MODELS@%${NOOBS_SUPPORTED_MODELS}%g" \ - -e "s%@NOOBS_HEX@%${NOOBS_HEX}%g" \ -i ${RELEASE_DIR}/${NOOBS_DISTRO}/os.json sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \