Merge bitcoin/bitcoin#23543: test: Prevent non-compatible sed binary for scripted-diffs

d8dfc403f74858b79c87f650b5d609aa60a4dc3b script: redirecting stderr to stdout before pipelining into grep (anouar kappitou)
30df5c3dd4d39d9027b0341d01d3233400104893 script: preventing non-compatible sed binary. (anouar kappitou)

Pull request description:

  This Pull request improve scripted diff by checking for non-compatible sed binary. Fixes #19815

ACKs for top commit:
  shaavan:
    reACK d8dfc403f74858b79c87f650b5d609aa60a4dc3b
  theStack:
    Tested ACK d8dfc403f74858b79c87f650b5d609aa60a4dc3b

Tree-SHA512: 4813abb02195e04b8953662e51cba4599789e6185a6d384f56255e2d37c2b16be46c7c8861e44ba1a13d42573a58eb708901472925cb308dba2f602020e9f0f6
This commit is contained in:
MarcoFalke 2022-01-24 12:22:04 +01:00 committed by pasta
parent 015034a31d
commit 4e9dc7e046

View File

@ -17,6 +17,11 @@ if test -z "$1"; then
exit 1 exit 1
fi fi
if ! sed --help 2>&1 | grep -q 'GNU'; then
echo "Error: the installed sed package is not compatible. Please make sure you have GNU sed installed in your system.";
exit 1;
fi
RET=0 RET=0
PREV_BRANCH=$(git name-rev --name-only HEAD) PREV_BRANCH=$(git name-rev --name-only HEAD)
PREV_HEAD=$(git rev-parse HEAD) PREV_HEAD=$(git rev-parse HEAD)