fix(deck): Improve just scripts for bios handling

This commit is contained in:
Kyle Gospodnetich 2023-11-24 09:16:12 -08:00
parent 7c8ad27f7e
commit ab5a5038eb

View File

@ -373,6 +373,8 @@ unhide-grub:
# Install Deck HD BIOS # Install Deck HD BIOS
install-deckhd-bios: install-deckhd-bios:
#!/usr/bin/env bash #!/usr/bin/env bash
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution") RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
if [[ "${RESOLUTION}" = "1200,1920" ]]; then if [[ "${RESOLUTION}" = "1200,1920" ]]; then
sudo systemctl mask --now jupiter-biosupdate.service sudo systemctl mask --now jupiter-biosupdate.service
@ -382,12 +384,20 @@ install-deckhd-bios:
else else
echo "Unable to detect DeckHD. Aborting..." echo "Unable to detect DeckHD. Aborting..."
fi fi
else
echo "This is only applicable to LCD Steam Decks with the DeckHD screen. Aborting..."
fi
# Enable BIOS & Firmware update services for the Steam Deck # Enable BIOS & Firmware update services for the Steam Deck
enable-deck-bios-firmware-updates: enable-deck-bios-firmware-updates:
#!/usr/bin/env bash #!/usr/bin/env bash
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
sudo systemctl enable jupiter-biosupdate.service sudo systemctl enable jupiter-biosupdate.service
sudo systemctl enable jupiter-controller-update.service sudo systemctl enable jupiter-controller-update.service
else
echo "This is only applicable to Valve's Steam Deck. Aborting..."
fi
# Disable Steam Deck BIOS updates # Disable Steam Deck BIOS updates
disable-bios-updates: disable-bios-updates: