From 402a8ff4c7d1554fcafe402e1e4ce66fc476f630 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 7 Oct 2023 16:36:02 +0200 Subject: [PATCH] Write empty object if "extras" is empty Rawhide has no openh264 builds which results in writing an array with an empty string as "extras" value. This breaks the installer. --- make-asahi-installer-package.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make-asahi-installer-package.sh b/make-asahi-installer-package.sh index 73319c0..efde903 100755 --- a/make-asahi-installer-package.sh +++ b/make-asahi-installer-package.sh @@ -89,6 +89,11 @@ popd > /dev/null openh264_rpms=$(rpmdistro-repoquery fedora "$release" gstreamer1-plugin-openh264 mozilla-openh264 openh264 --location) +if [ -e "${openh264_rpms}"]; then + extras="{}" +else + extras="$(printf '%s\n' "${openh264_rpms}" | newlineToJson)" + cat > "${package}.json" < "${package}.json" <