yandex-browser.sh 1.34 KB
Newer Older
1 2
#!/bin/sh

3 4
BASEPKGNAME=yandex-browser
SUPPORTEDARCHES="x86_64"
5
PRODUCTALT="stable beta corporate"
6
VERSION="$2"
7
DESCRIPTION="Yandex browser from the official site"
8
URL="https://browser.yandex.ru/"
9
TIPS="Run 'epm play yandex-browser=beta' to install beta version of the browser."
10

11
. $(dirname $0)/common.sh
12

13 14 15
warn_version_is_not_supported
VERSION="*"

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

18
URL="https://repo.yandex.ru/yandex-browser"
19

20
if [ "$(epm print info -p)" = "rpm" ] ; then
21
    # https://repo.yandex.ru/yandex-browser/rpm/stable/x86_64/yandex-browser-stable-23.1.1.1114-1.x86_64.rpm
22
    [ "$BRANCH" = "corporate" ] && BRANCH="stable"
23
    PKGURL="$URL/rpm/$BRANCH/x86_64/$(epm print constructname $PKGNAME "$VERSION*" x86_64 rpm)"
24 25
else
    # https://repo.yandex.ru/yandex-browser/deb/pool/main/y/yandex-browser-beta/yandex-browser-beta_23.5.4.682-1_amd64.deb
26
    PKGURL="$URL/deb/pool/main/y/$PKGNAME/$(epm print constructname $PKGNAME "$VERSION*" amd64 deb)"
27
fi
28

29
if [ "$(epm print info -s)" = "redos" ] ; then
30 31 32 33
    BRANCH="stable"
    PKGURL="$URL/rpm/redos/x86_64/$(epm print constructname $PKGNAME "$VERSION*" x86_64 rpm)"
fi

34 35
install_pkgurl

36 37 38 39
# TODO: use needed version
if [ "$(epm print info -s)" = "alt" ] ; then
    epm install ffmpeg-plugin-browser
    exit
40 41 42
else
    epm play nwjs-ffmpeg-prebuilt=0.87.0
    exit
43 44
fi