yandex-browser.sh 957 Bytes
Newer Older
1 2
#!/bin/sh

3 4
PRODUCTDIR=/opt/yandex/browser
DESCRIPTION="Yandex browser from the official site"
5
TIPS="Run 'epm play yandex-browser beta' to install beta version of the browser."
6

7
PRODUCTALT="stable beta"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
8
BRANCH=stable
9
if [ "$2" = "beta" ] || epm installed yandex-browser-beta ; then
10 11
    BRANCH=beta
    PRODUCTDIR=/opt/yandex/browser-$BRANCH
12 13
fi

14
PKGNAME=yandex-browser-$BRANCH
15
SUPPORTEDARCHES="x86_64"
16

17
. $(dirname $0)/common.sh
18 19 20

# See also https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yandex-browser-beta

21 22 23 24 25
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"

26
# epm uses eget to download * names
27
epm install "$URL/deb/pool/main/y/$PKGNAME/$(epm print constructname $PKGNAME "*" amd64 deb)" || exit
28

29
epm play yandex-browser-codecs-ffmpeg-extra $BRANCH