diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-07-15 15:41:48 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-07-15 15:41:48 +0800 |
| commit | f2a767a9cdc51384115c054020611a980451f074 (patch) | |
| tree | a1033548453de9bf32017055c39666d26f891c55 /build_files/patch-bazzite-deck-identity.sh | |
| parent | f66aa82b4c3890c8f6b2741bfedd31405dcbd39f (diff) | |
| download | AeroCore-OS-f2a767a9cdc51384115c054020611a980451f074.tar.gz AeroCore-OS-f2a767a9cdc51384115c054020611a980451f074.zip | |
Preserve upstream desktop metadata
Keep the base image's kinoite or silverblue identity intact.
Detect AeroCore Deck behavior from its image name instead.
Diffstat (limited to 'build_files/patch-bazzite-deck-identity.sh')
| -rwxr-xr-x | build_files/patch-bazzite-deck-identity.sh | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/build_files/patch-bazzite-deck-identity.sh b/build_files/patch-bazzite-deck-identity.sh index 600d97e..078b76c 100755 --- a/build_files/patch-bazzite-deck-identity.sh +++ b/build_files/patch-bazzite-deck-identity.sh @@ -7,9 +7,7 @@ hardware_setup="${1:-/usr/libexec/bazzite-hardware-setup}" # shellcheck disable=SC2016 old_condition='if [[ "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' # shellcheck disable=SC2016 -new_condition='if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* && "$BASE_IMAGE_NAME" != *deck* && "$BASE_IMAGE_NAME" != *dx* ]]; then' -# shellcheck disable=SC2016 -base_image_assignment='BASE_IMAGE_NAME=$(jq -r '\''."base-image-name"'\'' < $IMAGE_INFO)' +new_condition='if [[ "$IMAGE_NAME" != aerocore-os && "$IMAGE_NAME" != *deck* && "$IMAGE_NAME" != *dx* ]]; then' if grep -Fqx "$new_condition" "$hardware_setup"; then exit 0 @@ -20,23 +18,13 @@ if [[ "$(grep -Fxc "$old_condition" "$hardware_setup")" -ne 1 ]]; then exit 1 fi -add_base_image_assignment=0 -if ! grep -Fqx "$base_image_assignment" "$hardware_setup"; then - add_base_image_assignment=1 -fi - patched_file=$(mktemp) trap 'rm -f "$patched_file"' EXIT awk \ -v old_condition="$old_condition" \ -v new_condition="$new_condition" \ - -v base_image_assignment="$base_image_assignment" \ - -v add_base_image_assignment="$add_base_image_assignment" \ '$0 == old_condition { - if (add_base_image_assignment) { - print base_image_assignment - } print new_condition next } |
