1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

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.
This commit is contained in:
Yaroslav Lelkin 2025-03-15 10:25:45 +05:00 committed by Jelle Raaijmakers
parent e655b77393
commit b08903b39b
Notes: github-actions[bot] 2025-03-26 21:00:00 +00:00

View file

@ -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