From dbe15d4f0067de1b7ee9595aa35da52d86843b1f Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Fri, 8 Sep 2023 20:31:46 -0400 Subject: [PATCH] api: modernize `is_supported_system` checks prep for dropping older Ubuntu and Debian versions --- api | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api b/api index c0480e26e8..14e2eabbfd 100755 --- a/api +++ b/api @@ -2545,15 +2545,15 @@ apt.armbian.com")" elif cat /proc/version | grep -qi Microsoft || cat /proc/sys/kernel/osrelease | grep -qi WSL || [[ -f "/run/WSL" ]] || [[ -f "/etc/wsl.conf" ]] || [ -n "$WSL_DISTRO_NAME" ]; then echo "Pi-Apps is not supported on WSL." return 1 - elif echo "$PRETTY_NAME" | grep -qi 'stretch\|wheezy\|jessie'; then - echo "Pi-Apps is not supported on your outdated operating system. Expect many apps to fail. Consider upgrading your operating system." + elif ([ "$__os_id" == "Debian" ] || [ "$__os_id" == "Raspbian" ]) && ! printf '%s\n' "10" "$__os_release" | sort -CV ; then + echo "Pi-Apps is not supported on your outdated $__os_id $__os_release operating system. Expect many apps to fail. Consider upgrading your operating system." + return 1 + elif [ "$__os_id" == "Ubuntu" ] && ! printf '%s\n' "18.04" "$__os_release" | sort -CV ; then + echo "Pi-Apps is not supported on your outdated $__os_id $__os_release operating system. Expect many apps to fail. Consider upgrading your operating system." return 1 elif echo "$PRETTY_NAME" | grep -qi 'manjaro'; then echo "Pi-Apps is not supported on Manjaro." return 1 - elif echo "$PRETTY_NAME" | grep -qi 'Ubuntu 16'; then - echo "Pi-Apps is not supported on Ubuntu 16." - return 1 elif [[ "$(uname -m)" == armv6* ]]; then echo "Pi-Apps is not supported on ARMv6 Raspberry Pi boards. Expect some apps to fail." return 1