From 7b40ed9dc38624d306414e1b8a2b32346e3a753a Mon Sep 17 00:00:00 2001 From: Alvin Schiller <103769832+AlvinSchiller@users.noreply.github.com> Date: Sat, 21 Sep 2024 22:35:30 +0200 Subject: [PATCH] fix: update check for debian derived os. integrate checks RPiOS: 32-bit = raspbian, 64-bit = debian --- installation/includes/02_helpers.sh | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/installation/includes/02_helpers.sh b/installation/includes/02_helpers.sh index 55eefba76..4fd373565 100644 --- a/installation/includes/02_helpers.sh +++ b/installation/includes/02_helpers.sh @@ -75,23 +75,11 @@ get_architecture() { echo $arch } -is_raspbian() { - if [[ $( . /etc/os-release; printf '%s\n' "$ID"; ) == *"raspbian"* ]] || [[ -f /etc/apt/sources.list.d/raspi.list ]]; then - echo true - else - echo false - fi -} - -get_debian_version_number() { - source /etc/os-release - echo "$VERSION_ID" -} - _get_boot_file_path() { local filename="$1" - if [ "$(is_raspbian)" = true ]; then - local debian_version_number=$(get_debian_version_number) + local os_release_id=$( . /etc/os-release; printf '%s\n' "$ID"; ) + if [[ "$os_release_id" == *"raspbian"* ]] || [[ "$os_release_id" == *"debian"* ]]; then + local debian_version_number=$( . /etc/os-release; printf '%s\n' "$VERSION_ID"; ) # Bullseye and lower if [ "$debian_version_number" -le 11 ]; then