]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
SCRIPTS: run-regtests: fix a few occurrences of extended regexes
authorWilly Tarreau <w@1wt.eu>
Wed, 15 May 2024 17:33:45 +0000 (19:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 May 2024 17:33:45 +0000 (19:33 +0200)
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

index eeb41f94f9e08772fd9ea77a748c0114523e5ab1..4a37248902fb0227ec25b41fc99fd606953e8652 100755 (executable)
@@ -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 "