Unverified Commit d44853ef authored by Matthew Fisher's avatar Matthew Fisher Committed by GitHub

Merge pull request #3737 from Ferenc-/master

Fix HTML parsing when setting TAG with wget
parents 48e70399 908addd6
...@@ -80,7 +80,7 @@ checkDesiredVersion() { ...@@ -80,7 +80,7 @@ checkDesiredVersion() {
if type "curl" > /dev/null; then if type "curl" > /dev/null; then
TAG=$(curl -SsL $release_url | awk '/\/tag\//' | grep -v no-underline | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}') TAG=$(curl -SsL $release_url | awk '/\/tag\//' | grep -v no-underline | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
elif type "wget" > /dev/null; then elif type "wget" > /dev/null; then
TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}') TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | grep -v no-underline | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
fi fi
if [ "x$TAG" == "x" ]; then if [ "x$TAG" == "x" ]; then
echo "Cannot determine ${DESIRED_VERSION} tag." echo "Cannot determine ${DESIRED_VERSION} tag."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment