From 019704d75718f21aec4bea344b98abcf44b1dadc Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Fri, 22 Sep 2023 22:47:15 -0600 Subject: [PATCH] fix(image-info): Don't wrap identifiers in quotations Instead of the raw key being assigned, a key wrapped in quotations was incorrectly assigned --- system_files/deck/shared/usr/bin/bazzite-autologin | 2 +- system_files/deck/shared/usr/bin/return-to-gamemode | 2 +- .../deck/shared/usr/bin/steamos-session-select | 2 +- .../deck/shared/usr/share/ublue-os/firstboot/yafti.yml | 2 +- .../deck/shared/usr/share/ublue-os/just/60-custom.just | 8 ++++---- .../desktop/shared/usr/bin/bazzite-hardware-setup | 4 ++-- system_files/desktop/shared/usr/bin/bazzite-user-setup | 4 ++-- .../desktop/shared/usr/etc/profile.d/askpass.sh | 2 +- .../shared/usr/share/ublue-os/firstboot/yafti.yml | 6 +++--- .../shared/usr/share/ublue-os/just/30-distrobox.just | 4 ++-- .../shared/usr/share/ublue-os/just/60-custom.just | 10 +++++----- system_files/shared/tmp/image-info.sh | 2 +- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/system_files/deck/shared/usr/bin/bazzite-autologin b/system_files/deck/shared/usr/bin/bazzite-autologin index 5a04fcd3..b7ee94ca 100755 --- a/system_files/deck/shared/usr/bin/bazzite-autologin +++ b/system_files/deck/shared/usr/bin/bazzite-autologin @@ -3,7 +3,7 @@ source /etc/default/desktop-wayland IMAGE_INFO="/usr/share/ublue-os/image-info.json" -BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) USER=$(id -nu 1000) diff --git a/system_files/deck/shared/usr/bin/return-to-gamemode b/system_files/deck/shared/usr/bin/return-to-gamemode index 389ba992..55f5227b 100755 --- a/system_files/deck/shared/usr/bin/return-to-gamemode +++ b/system_files/deck/shared/usr/bin/return-to-gamemode @@ -1,7 +1,7 @@ #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" -BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) USER=$(id -nu 1000) diff --git a/system_files/deck/shared/usr/bin/steamos-session-select b/system_files/deck/shared/usr/bin/steamos-session-select index 6ef65dec..b71ca14f 100755 --- a/system_files/deck/shared/usr/bin/steamos-session-select +++ b/system_files/deck/shared/usr/bin/steamos-session-select @@ -7,7 +7,7 @@ die() { echo >&2 "!! $*"; exit 1; } source /etc/default/desktop-wayland IMAGE_INFO="/usr/share/ublue-os/image-info.json" -BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) # File this script will modify, in addition to (potentially) the per-user sentinel file CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf" diff --git a/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml b/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml index 6680f9a5..b37930e4 100644 --- a/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml +++ b/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml @@ -212,7 +212,7 @@ screens: values: title: "GNOME Theme" condition: - run: grep -q 'silverblue' <<< $(jq '."base-image-name"' /usr/share/ublue-os/image-info.json) + run: grep -q 'silverblue' <<< $(jq -r '."base-image-name"' < /usr/share/ublue-os/image-info.json) links: - "Vapor Theme": run: just --unstable enable-vapor-theme diff --git a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just index 94e5923c..3ee71902 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just @@ -82,7 +82,7 @@ install-fleek-themes: #!/usr/bin/env bash if [[ -x "/var/usrlocal/bin/fleek" ]]; then IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then fleek add adw-gtk3 --apply else @@ -172,7 +172,7 @@ patch-gmod: enable-vapor-theme: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gsettings set org.gnome.mutter center-new-windows true @@ -195,7 +195,7 @@ enable-vapor-theme: enable-vgui2-theme: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gsettings set org.gnome.mutter center-new-windows true @@ -218,7 +218,7 @@ enable-vgui2-theme: install-adwaita-for-steam: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then if [ -d "$HOME/homebrew/themes" ]; then git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam" diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index 58647c43..d85de13f 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -1,8 +1,8 @@ #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" -IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO) -BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) +IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO) +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) # SCRIPT VERSION HWS_VER=1 diff --git a/system_files/desktop/shared/usr/bin/bazzite-user-setup b/system_files/desktop/shared/usr/bin/bazzite-user-setup index c5caf971..3bdf3ae8 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-user-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-user-setup @@ -1,8 +1,8 @@ #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" -IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO) -BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) +IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO) +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then echo 'Running setup for Kinoite' diff --git a/system_files/desktop/shared/usr/etc/profile.d/askpass.sh b/system_files/desktop/shared/usr/etc/profile.d/askpass.sh index 0bbdb988..a1d514e4 100755 --- a/system_files/desktop/shared/usr/etc/profile.d/askpass.sh +++ b/system_files/desktop/shared/usr/etc/profile.d/askpass.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" -BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) +BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then SUDO_ASKPASS='/usr/bin/ksshaskpass' diff --git a/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml b/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml index d473e067..781c070c 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml +++ b/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml @@ -67,7 +67,7 @@ screens: values: title: AMD Additions condition: - run: grep -q 'main' <<< $(jq '."image-flavor"' /usr/share/ublue-os/image-info.json) + run: grep -q 'main' <<< $(jq -r '."image-flavor"' < /usr/share/ublue-os/image-info.json) show_terminal: true package_manager: yafti.plugin.run packages: @@ -77,7 +77,7 @@ screens: values: title: Nvidia Additions condition: - run: grep -q 'nvidia' <<< $(jq '."image-flavor"' /usr/share/ublue-os/image-info.json) + run: grep -q 'nvidia' <<< $(jq -r '."image-flavor"' < /usr/share/ublue-os/image-info.json) show_terminal: true package_manager: yafti.plugin.run packages: @@ -206,7 +206,7 @@ screens: values: title: "GNOME Theme" condition: - run: grep -q 'silverblue' <<< $(jq '."base-image-name"' /usr/share/ublue-os/image-info.json) + run: grep -q 'silverblue' <<< $(jq -r '."base-image-name"' < /usr/share/ublue-os/image-info.json) links: - "Vapor Theme": run: just --unstable enable-vapor-theme diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just b/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just index 16587295..9c323ae6 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just @@ -44,7 +44,7 @@ install-obs-studio-portable: # Set up Bazzite-Arch Distrobox container install-bazzite-arch: IMAGE_INFO="/usr/share/ublue-os/image-info.json" && \ - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) && \ + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) && \ if grep -qz "bazzite-arch" <<< $(distrobox list); then \ echo 'Removing existing Bazzite Arch install...' && \ distrobox rm bazzite-arch --force; \ @@ -73,7 +73,7 @@ install-bazzite-arch: # Remove container image for bazzite-arch and reinstall it reset-bazzite-arch: IMAGE_INFO="/usr/share/ublue-os/image-info.json" && \ - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) && \ + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) && \ distrobox stop bazzite-arch && \ distrobox rm bazzite-arch --force && \ if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then \ diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just index 66090356..fb4c3487 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just @@ -57,7 +57,7 @@ install-fleek-themes: #!/usr/bin/env bash if [[ -x "/var/usrlocal/bin/fleek" ]]; then IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then fleek add adw-gtk3 --apply else @@ -84,7 +84,7 @@ get-greenlight: enable-supergfxctl: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - IMAGE_FLAVOR=$(jq '."image-flavor"' $IMAGE_INFO) + IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO) if [[ ${IMAGE_FLAVOR} == 'nvidia' ]]; then systemctl enable --now supergfxd.service else @@ -120,7 +120,7 @@ patch-steam-vr: enable-vapor-theme: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gsettings set org.gnome.mutter center-new-windows true @@ -145,7 +145,7 @@ enable-vapor-theme: enable-vgui2-theme: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gsettings set org.gnome.mutter center-new-windows true @@ -170,7 +170,7 @@ enable-vgui2-theme: install-adwaita-for-steam: #!/usr/bin/env bash IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then if [ -d "$HOME/homebrew/themes" ]; then git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam" diff --git a/system_files/shared/tmp/image-info.sh b/system_files/shared/tmp/image-info.sh index 5c3d026f..bc8bf7d0 100755 --- a/system_files/shared/tmp/image-info.sh +++ b/system_files/shared/tmp/image-info.sh @@ -20,7 +20,7 @@ cat > $IMAGE_INFO <