Commit 341bc40a authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: fix github json handling (some servers return optimized nonformatted answer)

parent e26509ff
......@@ -1253,8 +1253,9 @@ get_github_urls()
[ -n "$owner" ] || fatal "Can't get owner from $1"
[ -n "$project" ] || fatal "Can't get project from $1"
local URL="https://api.github.com/repos/$owner/$project/releases"
scat $URL | \
grep -i -o -E '"browser_download_url": "https://.*"' | cut -d'"' -f4
# api sometime returns unformatted json
scat $URL | sed -e 's|,\(["{]\)|,\n\1|g' | \
grep -i -o -E '"browser_download_url": *"https://.*"' | cut -d'"' -f4
}
# drop file path from URL
......
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