chore: Clean up logic in bazzite-hardware-setup

This commit is contained in:
Kyle Gospodnetich 2023-11-20 22:26:47 -08:00
parent ba9e953db1
commit bd0af0e77d

View File

@ -116,18 +116,16 @@ else
fi fi
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then RESOLUTION=$(lshw -json -c display | jq -r .[]."configuration"."resolution")
RESOLUTION=$(lshw -json -c display | jq -r .[]."configuration"."resolution") if [[ "${RESOLUTION}" = "1200,1920" ]]; then
if [[ "${RESOLUTION}" = "1200,1920" ]]; then echo "Jupiter with DeckHD detected, disabling BIOS updates..."
echo "Jupiter with DeckHD detected, disabling BIOS updates..." systemctl disable --now jupiter-biosupdate.service
systemctl disable --now jupiter-biosupdate.service else
else echo "Jupiter hardware detected, skipping further setup..."
echo "Jupiter hardware detected, skipping further setup..."
fi
elif [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
echo "Galileo hardware detected, skipping further setup..."
fi fi
elif [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
echo "Galileo hardware detected, skipping further setup..."
else else
echo "Generic device detected. Performing setup..." echo "Generic device detected. Performing setup..."
if [[ ":ROG Ally RC71L_RC71L:AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:G1618-04:G1619-04:83E1:" =~ ":$SYS_ID:" ]]; then if [[ ":ROG Ally RC71L_RC71L:AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:G1618-04:G1619-04:83E1:" =~ ":$SYS_ID:" ]]; then