diff --git a/Containerfile b/Containerfile index 0f30e1b2..cae8eb02 100644 --- a/Containerfile +++ b/Containerfile @@ -49,11 +49,13 @@ FROM ghcr.io/ublue-os/${SOURCE_IMAGE}${SOURCE_SUFFIX}:${SOURCE_TAG} ## the following RUN directive does all the things required to run "build.sh" as recommended. COPY packages.sh /tmp/packages.sh +COPY image-info.sh /tmp/image-info.sh COPY system_files/shared / RUN mkdir -p /var/lib/alternatives && \ /tmp/packages.sh && \ + /tmp/image-info.sh && \ ostree container commit # GNOME modifications diff --git a/image-info.sh b/image-info.sh new file mode 100755 index 00000000..aa7c8c2d --- /dev/null +++ b/image-info.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Tell this script to exit if there are any errors. +# You should have this in every custom script, to ensure that your completed +# builds actually ran successfully without any errors! +set -oue pipefail + +IMAGE_INFO="/usr/share/zeliblue/image-info.json" +IMAGE_VENDOR="zelikos" +IMAGE_REF="ostree-image-signed:docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME" +IMAGE_FLAVOR="" +IMAGE_TAG="latest" + +if grep -q "kinoite" <<< "${SOURCE_IMAGE}"; then + sed -i '/^PRETTY_NAME/s/Kinoite/Zeliblue Plasma/' /usr/lib/os-release + sed -i '/^VERSION/s/Kinoite/Zeliblue Plasma/' /usr/lib/os-release + IMAGE_FLAVOR="kinoite" +else + sed -i '/^PRETTY_NAME/s/Silverblue/Zeliblue GNOME/' /usr/lib/os-release + sed -i '/^VERSION/s/Silverblue/Zeliblue GNOME/' /usr/lib/os-release + IMAGE_FLAVOR="silverblue" +fi + +cat > $IMAGE_INFO <