diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-17 09:11:57 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-17 10:33:43 +0100 |
| commit | 1722964f66562c690bfcc749674d08c2ad89badb (patch) | |
| tree | a8a76aee599dfcce91abf7fab45836ffe797253b | |
| parent | 63596046d1265384f4851bbda5d028568ef5ebd9 (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-x | mk | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 || : |
