Skip to content

Commit

Permalink
fix(image-info): Don't wrap identifiers in quotations
Browse files Browse the repository at this point in the history
Instead of the raw key being assigned, a key wrapped in quotations was
incorrectly assigned
  • Loading branch information
EyeCantCU committed Sep 23, 2023
1 parent 442e0c4 commit 019704d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion system_files/deck/shared/usr/bin/bazzite-autologin
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion system_files/deck/shared/usr/bin/return-to-gamemode
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion system_files/deck/shared/usr/bin/steamos-session-select
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions system_files/desktop/shared/usr/bin/bazzite-hardware-setup
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions system_files/desktop/shared/usr/bin/bazzite-user-setup
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion system_files/desktop/shared/usr/etc/profile.d/askpass.sh
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion system_files/shared/tmp/image-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cat > $IMAGE_INFO <<EOF
"image-flavor": "$IMAGE_FLAVOR",
"image-vendor": "$IMAGE_VENDOR",
"image-ref": "$IMAGE_REF",
"image-tag":"$IMAGE_TAG",
"image-tag": "$IMAGE_TAG",
"base-image-name": "$BASE_IMAGE_NAME",
"fedora-version": "$FEDORA_MAJOR_VERSION"
}
Expand Down

0 comments on commit 019704d

Please sign in to comment.