bazzite/system_files/shared/tmp/image-info.sh
RJ Trujillo 019704d757 fix(image-info): Don't wrap identifiers in quotations
Instead of the raw key being assigned, a key wrapped in quotations was
incorrectly assigned
2023-09-22 22:56:26 -06:00

28 lines
543 B
Bash
Executable File

#!/usr/bin/env bash
set -oue pipefail
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_REF="docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME"
case $FEDORA_MAJOR_VERSION in
38)
IMAGE_TAG="latest"
;;
*)
IMAGE_TAG="$FEDORA_MAJOR_VERSION"
;;
esac
cat > $IMAGE_INFO <<EOF
{
"image-name": "$IMAGE_NAME",
"image-flavor": "$IMAGE_FLAVOR",
"image-vendor": "$IMAGE_VENDOR",
"image-ref": "$IMAGE_REF",
"image-tag": "$IMAGE_TAG",
"base-image-name": "$BASE_IMAGE_NAME",
"fedora-version": "$FEDORA_MAJOR_VERSION"
}
EOF