scripts/image: only include hex version in noobs os.json if NOOBS_HEX is set

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2019-06-27 01:37:29 +02:00
parent 08f7a574d6
commit 81d8d58d7e

View File

@ -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" \