Handle HTTP/2 different ETag header output

This commit is contained in:
Tim Dettrick 2016-10-14 09:29:00 +10:00
parent c49cb200fc
commit 449a01ea63
No known key found for this signature in database
GPG Key ID: 510E08BC6E9F0EB7

View File

@ -32,8 +32,8 @@ if [ ! -f ${release}_etag ]; then
fi
# Retrieve the remote etag header
remote_etag=$(curl -I ${url} -k -s | \
gawk '/ETag/ {print gensub("\"", "", "g", $2)}')
remote_etag=$(curl -I ${url} -k -s | \
grep -i '^etag:' | sed -e 's/.*: *//' -e 's/["\r\n]//g')
source ${release}_etag > /dev/null 2>&1