summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-09-17 09:11:57 +0100
committerLeah Rowe <leah@libreboot.org>2026-09-17 10:33:43 +0100
commit1722964f66562c690bfcc749674d08c2ad89badb (patch)
treea8a76aee599dfcce91abf7fab45836ffe797253b
parent63596046d1265384f4851bbda5d028568ef5ebd9 (diff)
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>
-rwxr-xr-xmk4
1 files changed, 1 insertions, 3 deletions
diff --git a/mk b/mk
index b5dbd431..a6525310 100755
--- a/mk
+++ b/mk
@@ -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 || :