From d6a5217798877b7e197952ce13588ab34c21dbf5 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 29 Jan 2024 12:13:53 +0100 Subject: [PATCH 1/2] fix(steamos-update): Properly read the return code of the upgrade command Fixes the following error: /tmp/upgrade-check: integer expression expected --- system_files/deck/shared/usr/bin/steamos-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/deck/shared/usr/bin/steamos-update b/system_files/deck/shared/usr/bin/steamos-update index e822618d..5f9d1916 100755 --- a/system_files/deck/shared/usr/bin/steamos-update +++ b/system_files/deck/shared/usr/bin/steamos-update @@ -66,7 +66,7 @@ if command -v ublue-update > /dev/null; then } upgrade | fake_progress # Check if upgrade failed - UPGRADE_CHECK=/tmp/upgrade-check + UPGRADE_CHECK=$(cat /tmp/upgrade-check) rm /tmp/upgrade-check if [ ${UPGRADE_CHECK} -eq 0 ]; then touch /tmp/upgrade-installed From cd56fe49756349b893faf13cee545714269d7eb3 Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 29 Jan 2024 12:20:29 +0100 Subject: [PATCH 2/2] fix(steamos-update): Use double quotes to prevent potential globbing and word splitting --- system_files/deck/shared/usr/bin/steamos-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/deck/shared/usr/bin/steamos-update b/system_files/deck/shared/usr/bin/steamos-update index 5f9d1916..b98d24c7 100755 --- a/system_files/deck/shared/usr/bin/steamos-update +++ b/system_files/deck/shared/usr/bin/steamos-update @@ -68,7 +68,7 @@ if command -v ublue-update > /dev/null; then # Check if upgrade failed UPGRADE_CHECK=$(cat /tmp/upgrade-check) rm /tmp/upgrade-check - if [ ${UPGRADE_CHECK} -eq 0 ]; then + if [ "${UPGRADE_CHECK}" -eq 0 ]; then touch /tmp/upgrade-installed else exit 0 # Upgrade failed