fix(image-info): Don't wrap identifiers in quotations

Instead of the raw key being assigned, a key wrapped in quotations was
incorrectly assigned
This commit is contained in:
RJ Trujillo 2023-09-22 22:47:15 -06:00
parent 442e0c4733
commit 019704d757
12 changed files with 24 additions and 24 deletions

View File

@ -3,7 +3,7 @@
source /etc/default/desktop-wayland source /etc/default/desktop-wayland
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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) USER=$(id -nu 1000)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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) USER=$(id -nu 1000)

View File

@ -7,7 +7,7 @@ die() { echo >&2 "!! $*"; exit 1; }
source /etc/default/desktop-wayland source /etc/default/desktop-wayland
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 # File this script will modify, in addition to (potentially) the per-user sentinel file
CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf" CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf"

View File

@ -212,7 +212,7 @@ screens:
values: values:
title: "GNOME Theme" title: "GNOME Theme"
condition: 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: links:
- "Vapor Theme": - "Vapor Theme":
run: just --unstable enable-vapor-theme run: just --unstable enable-vapor-theme

View File

@ -82,7 +82,7 @@ install-fleek-themes:
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ -x "/var/usrlocal/bin/fleek" ]]; then if [[ -x "/var/usrlocal/bin/fleek" ]]; then
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
fleek add adw-gtk3 --apply fleek add adw-gtk3 --apply
else else
@ -172,7 +172,7 @@ patch-gmod:
enable-vapor-theme: enable-vapor-theme:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true gsettings set org.gnome.mutter center-new-windows true
@ -195,7 +195,7 @@ enable-vapor-theme:
enable-vgui2-theme: enable-vgui2-theme:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true gsettings set org.gnome.mutter center-new-windows true
@ -218,7 +218,7 @@ enable-vgui2-theme:
install-adwaita-for-steam: install-adwaita-for-steam:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
if [ -d "$HOME/homebrew/themes" ]; 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" git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam"

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO) IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
BASE_IMAGE_NAME=$(jq '."base-image-name"' $IMAGE_INFO) BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
# SCRIPT VERSION # SCRIPT VERSION
HWS_VER=1 HWS_VER=1

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_NAME=$(jq '."image-name"' $IMAGE_INFO) IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO)
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 if [[ $BASE_IMAGE_NAME =~ "kinoite" ]]; then
echo 'Running setup for Kinoite' echo 'Running setup for Kinoite'

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then
SUDO_ASKPASS='/usr/bin/ksshaskpass' SUDO_ASKPASS='/usr/bin/ksshaskpass'

View File

@ -67,7 +67,7 @@ screens:
values: values:
title: AMD Additions title: AMD Additions
condition: 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 show_terminal: true
package_manager: yafti.plugin.run package_manager: yafti.plugin.run
packages: packages:
@ -77,7 +77,7 @@ screens:
values: values:
title: Nvidia Additions title: Nvidia Additions
condition: 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 show_terminal: true
package_manager: yafti.plugin.run package_manager: yafti.plugin.run
packages: packages:
@ -206,7 +206,7 @@ screens:
values: values:
title: "GNOME Theme" title: "GNOME Theme"
condition: 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: links:
- "Vapor Theme": - "Vapor Theme":
run: just --unstable enable-vapor-theme run: just --unstable enable-vapor-theme

View File

@ -44,7 +44,7 @@ install-obs-studio-portable:
# Set up Bazzite-Arch Distrobox container # Set up Bazzite-Arch Distrobox container
install-bazzite-arch: install-bazzite-arch:
IMAGE_INFO="/usr/share/ublue-os/image-info.json" && \ 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 \ if grep -qz "bazzite-arch" <<< $(distrobox list); then \
echo 'Removing existing Bazzite Arch install...' && \ echo 'Removing existing Bazzite Arch install...' && \
distrobox rm bazzite-arch --force; \ distrobox rm bazzite-arch --force; \
@ -73,7 +73,7 @@ install-bazzite-arch:
# Remove container image for bazzite-arch and reinstall it # Remove container image for bazzite-arch and reinstall it
reset-bazzite-arch: reset-bazzite-arch:
IMAGE_INFO="/usr/share/ublue-os/image-info.json" && \ 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 stop bazzite-arch && \
distrobox rm bazzite-arch --force && \ distrobox rm bazzite-arch --force && \
if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then \ if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then \

View File

@ -57,7 +57,7 @@ install-fleek-themes:
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ -x "/var/usrlocal/bin/fleek" ]]; then if [[ -x "/var/usrlocal/bin/fleek" ]]; then
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
fleek add adw-gtk3 --apply fleek add adw-gtk3 --apply
else else
@ -84,7 +84,7 @@ get-greenlight:
enable-supergfxctl: enable-supergfxctl:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 if [[ ${IMAGE_FLAVOR} == 'nvidia' ]]; then
systemctl enable --now supergfxd.service systemctl enable --now supergfxd.service
else else
@ -120,7 +120,7 @@ patch-steam-vr:
enable-vapor-theme: enable-vapor-theme:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true gsettings set org.gnome.mutter center-new-windows true
@ -145,7 +145,7 @@ enable-vapor-theme:
enable-vgui2-theme: enable-vgui2-theme:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com gnome-extensions enable user-theme@gnome-shell-extensions.gcampax.github.com
gsettings set org.gnome.mutter center-new-windows true gsettings set org.gnome.mutter center-new-windows true
@ -170,7 +170,7 @@ enable-vgui2-theme:
install-adwaita-for-steam: install-adwaita-for-steam:
#!/usr/bin/env bash #!/usr/bin/env bash
IMAGE_INFO="/usr/share/ublue-os/image-info.json" 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 [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
if [ -d "$HOME/homebrew/themes" ]; 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" git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam"

View File

@ -20,7 +20,7 @@ cat > $IMAGE_INFO <<EOF
"image-flavor": "$IMAGE_FLAVOR", "image-flavor": "$IMAGE_FLAVOR",
"image-vendor": "$IMAGE_VENDOR", "image-vendor": "$IMAGE_VENDOR",
"image-ref": "$IMAGE_REF", "image-ref": "$IMAGE_REF",
"image-tag":"$IMAGE_TAG", "image-tag": "$IMAGE_TAG",
"base-image-name": "$BASE_IMAGE_NAME", "base-image-name": "$BASE_IMAGE_NAME",
"fedora-version": "$FEDORA_MAJOR_VERSION" "fedora-version": "$FEDORA_MAJOR_VERSION"
} }