From 74aac9fe0e5dab12e0f8f3e055b3902920b51226 Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Fri, 22 Sep 2023 16:08:22 -0600 Subject: [PATCH] fix(just): Use image info consistently --- .../deck/shared/usr/share/ublue-os/just/60-custom.just | 8 ++++---- .../shared/usr/share/ublue-os/just/30-distrobox.just | 7 +++++-- .../desktop/shared/usr/share/ublue-os/just/60-custom.just | 8 +++++--- 3 files changed, 14 insertions(+), 9 deletions(-) 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 599d81fa4a..8290a723a2 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"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq '."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"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq '."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"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq '."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"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq '."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/share/ublue-os/just/30-distrobox.just b/system_files/desktop/shared/usr/share/ublue-os/just/30-distrobox.just index 71f2478557..165872959b 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 @@ -43,7 +43,8 @@ install-obs-studio-portable: # Set up Bazzite-Arch Distrobox container install-bazzite-arch: - source /etc/default/bazzite && \ + IMAGE_INFO="/usr/share/ublue-os/image-info.json" && \ + BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) && \ if grep -qz "bazzite-arch" <<< $(distrobox list); then \ echo 'Removing existing Bazzite Arch install...' && \ distrobox rm bazzite-arch --force; \ @@ -71,8 +72,10 @@ 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) && \ distrobox stop bazzite-arch && \ - distrobox rm bazzite-arch --force \ + distrobox rm bazzite-arch --force && \ if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then \ podman image rm bazzite-arch --force \ else \ 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 e9bbd3de43..672d7e13d1 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 @@ -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_FLAVOR) + IMAGE_FLAVOR=$(jq '."image-flavor"' $IMAGE_INFO) if [[ ${IMAGE_FLAVOR} == 'nvidia' ]]; then systemctl enable --now supergfxd.service else @@ -115,7 +115,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"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq '."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 @@ -140,7 +140,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"' $BASE_IMAGE_NAME) + BASE_IMAGE_NAME=$(jq '."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 @@ -164,6 +164,8 @@ enable-vgui2-theme: # Install Adwaita-for-Steam theme for CSS Loader (https://github.com/tkashkin/Adwaita-for-Steam) 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) && \ 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"