Skip to content

Commit

Permalink
fix: update check for debian derived os. integrate checks
Browse files Browse the repository at this point in the history
RPiOS: 32-bit = raspbian, 64-bit = debian
  • Loading branch information
AlvinSchiller committed Sep 21, 2024
1 parent 2e6dde3 commit 7b40ed9
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions installation/includes/02_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b40ed9

Please sign in to comment.