forked from ublue-os/main
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides a useful reference for the state of the current installed image that can be utilized via ublue update for auto-signing or in scripts to determine what changes to make and exclude Also ships jq for parsing generated image information For example... `jq '."image-flavor"' /usr/share/ublue-os/image-info.json` ... would print the flavor of the image (I.E. nvidia)
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/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", | ||
"fedora-version": "$FEDORA_MAJOR_VERSION" | ||
} | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters