mk: add safety check for grep -o usage

very unlikely not to have it, but we deal in
certainty, not rm -Rf /

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-17 09:11:57 +01:00
parent 63596046d1
commit 1722964f66
+1 -3
View File
@@ -15,11 +15,9 @@ findpath()
x_ realpath \"%s\" 2>/dev/null' "$@"
}
# WARNING: relies on -o option in grep.
# gnu, busybox, openbsd, netbsd and freebsd all have it
printf "%s\n" "%s" | grep -o "%s" 1>/dev/null || exit 1 # safety (-o check)
forx()
{
awkarg="{printf \"${1-};\""
shift 1 2>/dev/null || :