Skip to content

Commit

Permalink
Sonic Pi: update to latest bookworm version
Browse files Browse the repository at this point in the history
correct auto-update script to latest bookworm changes
  • Loading branch information
theofficialgman committed Nov 26, 2023
1 parent 1d0fc66 commit c81a49b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/updates/Sonic Pi.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 7 additions & 9 deletions apps/Sonic Pi/install-64
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c81a49b

Please sign in to comment.