diff options
Diffstat (limited to 'scripts/livepatch')
| -rwxr-xr-x | scripts/livepatch/klp-build | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build index 564985a1588a..cf6c2bf694aa 100755 --- a/scripts/livepatch/klp-build +++ b/scripts/livepatch/klp-build @@ -56,6 +56,13 @@ grep0() { command grep "$@" || true } +# Because pipefail is enabled, the grep0 helper should be used instead of +# grep, otherwise a failed match can propagate to an error. +grep() { + echo "error: $SCRIPT: use grep0 or 'command grep' instead of bare grep" >&2 + exit 1 +} + status() { echo "$*" } |
