From b08903b39b1aecb518fd10c26abb96aa745ae1e4 Mon Sep 17 00:00:00 2001 From: Yaroslav Lelkin Date: Sat, 15 Mar 2025 10:25:45 +0500 Subject: [PATCH] Meta: Make shell_include.sh compatible with busybox Busybox version of sort utility doesn't support --version-sort and --check CLI args, only their short alternatives (-V and -c, respectively). Use the short alternatives to gain the busybox compatibility. --- Meta/shell_include.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/shell_include.sh b/Meta/shell_include.sh index f4bf86da08a..c0162b1c6a5 100644 --- a/Meta/shell_include.sh +++ b/Meta/shell_include.sh @@ -26,7 +26,7 @@ check_program_version_at_least() return 1 fi v=$("$2" --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1) - if printf '%s\n' "$3" "$v" | sort --version-sort --check &>/dev/null; then + if printf '%s\n' "$3" "$v" | sort -V -c &>/dev/null; then echo "ok, found $v" return 0; else