From 24da8a0ed415c019179ca2c4f7496cbdffb7e4d0 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 12 Jan 2018 11:05:20 -0500 Subject: [PATCH] [ci] use alternate bash comparison The pattern `echo str | grep -qE pattern` likes to fail on the z CI here for an unknown reason. Use `grep -qE pattern <<< str` instead. Signed-off-by: Christopher Jones --- contrib/download-frozen-image-v2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/download-frozen-image-v2.sh b/contrib/download-frozen-image-v2.sh index 22a4b78273..54b592307f 100755 --- a/contrib/download-frozen-image-v2.sh +++ b/contrib/download-frozen-image-v2.sh @@ -63,7 +63,7 @@ fetch_blob() { -D- )" curlHeaders="$(echo "$curlHeaders" | tr -d '\r')" - if echo "$curlHeaders" | grep -qE "^HTTP/[0-9].[0-9] 3"; then + if grep -qE "^HTTP/[0-9].[0-9] 3" <<<"$curlHeaders"; then rm -f "$targetFile" local blobRedirect="$(echo "$curlHeaders" | awk -F ': ' 'tolower($1) == "location" { print $2; exit }')"