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

check eget result for -O-

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