From b6ed749adc09ab90572246906b821eb231411983 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 15 May 2024 19:33:45 +0200 Subject: [PATCH] SCRIPTS: run-regtests: fix a few occurrences of extended regexes Running run-regtests on OpenBSD failed to identify haproxy version and the various build options because the backslash is not recognized in grep expressions. One must only use -E for the extended regexes and not use the slash. --- scripts/run-regtests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index eeb41f94f9..4a37248902 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -344,16 +344,16 @@ if [ $preparefailed ]; then fi { read HAPROXY_VERSION; read TARGET; read FEATURES; read SERVICES; } << EOF -$($HAPROXY_PROGRAM $HAPROXY_ARGS -vv | grep 'HA-\?Proxy version\|TARGET.*=\|^Feature\|^Available services' | sed 's/.* [:=] //') +$($HAPROXY_PROGRAM $HAPROXY_ARGS -vv | grep -E 'HA-?Proxy version|TARGET.*=|^Feature|^Available services' | sed 's/.* [:=] //') EOF HAPROXY_VERSION=$(echo $HAPROXY_VERSION | cut -d " " -f 3) echo "Testing with haproxy version: $HAPROXY_VERSION" -PROJECT_VERSION=$(${MAKE:-make} version 2>&1 | grep '^VERSION:\|^SUBVERS:'|cut -f2 -d' '|tr -d '\012') +PROJECT_VERSION=$(${MAKE:-make} version 2>&1 | grep -E '^VERSION:|^SUBVERS:'|cut -f2 -d' '|tr -d '\012') if [ -z "${PROJECT_VERSION}${MAKE}" ]; then # try again with gmake, just in case - PROJECT_VERSION=$(gmake version 2>&1 | grep '^VERSION:\|^SUBVERS:'|cut -f2 -d' '|tr -d '\012') + PROJECT_VERSION=$(gmake version 2>&1 | grep -E '^VERSION:|^SUBVERS:'|cut -f2 -d' '|tr -d '\012') fi FEATURES_PATTERN=" $FEATURES "