From 1f32893fd6a869f4f9ae5915c6af481b5ae3a93c Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:07:59 -0700 Subject: [PATCH] fix: remove image-info.json from base image if it exists (#162) * fix: remove image-info.json from base image if it exists This just makes it so if the user forgets to run the signing script and somehow installs `ublue-update`, `ublue-update` won't try to rebase them to the base image they chose * docs: clearer comment for image-info remove line --------- Co-authored-by: xyny <60004820+xynydev@users.noreply.github.com> --- build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.sh b/build.sh index 2ee040d2c0..f4eedce4b8 100644 --- a/build.sh +++ b/build.sh @@ -62,4 +62,12 @@ OS_VERSION="$(grep -Po '(?<=VERSION_ID=)\d+' /usr/lib/os-release)" # Welcome. echo "Building $IMAGE_NAME from $BASE_IMAGE:$OS_VERSION." +# Remove old image-info.json from main image +# (this file is added back by signing.sh, but shouldn't exist +# with wrong details in an unsigned image) +IMAGE_INFO="/usr/share/ublue-os/image-info.json" +if [ -f "$IMAGE_INFO" ]; then + rm -v "$IMAGE_INFO" +fi + run_modules "$RECIPE_FILE"