Commit 480620ad authored by Vitaly Lipatov's avatar Vitaly Lipatov

check eget result for -O-

parent d932349c
......@@ -27,8 +27,9 @@ get_latest_version()
{
URL="https://eepm.ru/app-versions"
#update_url_if_need_mirrored
# TODO: check eget result, use only 200 OK
epm tool eget -q -O- "$URL/$1" | head -n1 | cut -d" " -f1
local var
var="$(epm tool eget -q -O- "$URL/$1")" || return
echo "$var" | head -n1 | cut -d" " -f1
}
__check_for_epm_version()
......
......@@ -79,8 +79,8 @@ get_latest_version()
local epmver="$(epm --short --version)"
local URL
for URL in "https://eepm.ru/releases/$epmver/app-versions" "https://eepm.ru/app-versions" ; do
# TODO: check eget result, use only 200 OK
ver="$(eget -q -O- "$URL/$1" | head -n1 | cut -d" " -f1)"
ver="$(eget -q -O- "$URL/$1")" || continue
ver="$(echo "$ver" | head -n1 | cut -d" " -f1)"
[ -n "$ver" ] && echo "$ver" && return
done
}
......
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