diff --git a/.github/workflows/updates/Sonic Pi.sh b/.github/workflows/updates/Sonic Pi.sh index 7c3a901b29..4d198619e1 100755 --- a/.github/workflows/updates/Sonic Pi.sh +++ b/.github/workflows/updates/Sonic Pi.sh @@ -1,6 +1,6 @@ #!/bin/bash -webVer=$(curl -s https://sonic-pi.net | grep -m 1 arm64.deb | sed 's/.*sonic-pi_//g; s/_bullseye\.arm64.*//g') -arm64_url="https://sonic-pi.net/files/releases/v${webVer%_*}/sonic-pi_${webVer}_bullseye.arm64.deb" +webVer=$(curl -s https://sonic-pi.net | grep -m 1 arm64.deb | sed 's/.*sonic-pi_//g; s/_bookworm\.arm64.*//g') +arm64_url="https://sonic-pi.net/files/releases/v${webVer%_*}/sonic-pi_${webVer}_bookworm.arm64.deb" source $GITHUB_WORKSPACE/.github/workflows/update_github_script.sh diff --git a/apps/Sonic Pi/install-64 b/apps/Sonic Pi/install-64 index 8b719b591c..16bb49e3fe 100755 --- a/apps/Sonic Pi/install-64 +++ b/apps/Sonic Pi/install-64 @@ -1,15 +1,13 @@ #!/bin/bash -version=4.4.0_1 - -#get version of glibc -glibc_ver="$(ldd --version | head -n1 | awk '{print $NF}')" # example value: 2.30 -maj="$(awk -F. '{print $1}' <<<"$glibc_ver")" -min="$(awk -F. '{print $2}' <<<"$glibc_ver")" +version=4.5.0_1 +#only use bookworm deb if glibc is 2.36 or greater +if package_is_new_enough libc6 2.36 ;then + install_packages https://sonic-pi.net/files/releases/v${version%_*}/sonic-pi_${version}_bookworm.arm64.deb || exit 1 #only use bullseye deb if glibc is 2.30 or greater -if [ $maj -eq 2 ] && [ $min -ge 30 ] || [ $maj -gt 2 ];then - install_packages https://sonic-pi.net/files/releases/v${version%_*}/sonic-pi_${version}_bullseye.arm64.deb libconfig9 || exit 1 +elif package_is_new_enough libc6 2.30 ;then + install_packages https://sonic-pi.net/files/releases/v4.4.0/sonic-pi_4.4.0_1_bullseye.arm64.deb libconfig9 || exit 1 else - error "User error: Sonic Pi is not available for 64-bit Debian Buster. Either switch to 32-bit Buster, or upgrade to 64-bit Bullseye." + error "User error: Sonic Pi is not available for older Debian/Ubuntu distros. Upgrade to a newer Debian/Ubuntu distribution." fi