mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01: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:
parent
e655b77393
commit
b08903b39b
|
|
@ -26,7 +26,7 @@ check_program_version_at_least()
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
v=$("$2" --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
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"
|
echo "ok, found $v"
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user