Commit 49c08aab authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play yandex-browser: add fallback for yandex-browser source URL

parent 6e2f1929
...@@ -84,4 +84,12 @@ check_supported_arch() ...@@ -84,4 +84,12 @@ check_supported_arch()
return 1 return 1
} }
# TODO: improve me (move to eget, just http-accessed)
check_url_is_accessible()
{
local res
res="$(epm tool eget --list "$1" "$2" 2>/dev/null)"
[ -n "$res" ]
}
check_supported_arch $SUPPORTEDARCHES || fatal "Only $SUPPORTEDARCHES is supported" check_supported_arch $SUPPORTEDARCHES || fatal "Only $SUPPORTEDARCHES is supported"
...@@ -18,7 +18,12 @@ SUPPORTEDARCHES="x86_64" ...@@ -18,7 +18,12 @@ SUPPORTEDARCHES="x86_64"
# See also https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yandex-browser-beta # See also https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yandex-browser-beta
URL="https://repo.yandex.r1u/yandex-browser"
SECONDURL="https://download.etersoft.ru/pub/download/yandex-browser"
check_url_is_accessible "$URL" "YANDEX-BROWSER-KEY.*" || check_url_is_accessible $SECONDURL "YANDEX-BROWSER-KEY.*" && URL="$SECONDURL"
# epm uses eget to download * names # epm uses eget to download * names
epm install "https://repo.yandex.ru/yandex-browser/deb/pool/main/y/$PKGNAME/$(epm print constructname $PKGNAME "*" amd64 deb)" || exit epm install "$URL/deb/pool/main/y/$PKGNAME/$(epm print constructname $PKGNAME "*" amd64 deb)" || exit
epm play yandex-browser-codecs-ffmpeg-extra $BRANCH epm play yandex-browser-codecs-ffmpeg-extra $BRANCH
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