Commit accf4387 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play opera: improve download latest available Linux version

parent 57d31869
...@@ -21,23 +21,24 @@ arch="amd64" ...@@ -21,23 +21,24 @@ arch="amd64"
epm play chromium-codecs-ffmpeg-extra || fatal epm play chromium-codecs-ffmpeg-extra || fatal
# Stable branch here for deb too
if [ "$BRANCH" = "stable" ] ; then if [ "$BRANCH" = "stable" ] ; then
# https://get.geo.opera.com/pub/${pkgname}/desktop/${pkgver}/linux/${pkgname}-stable_${pkgver}_amd64.deb URL="https://ftp.opera.com/pub/opera/desktop/"
# fast hack for download from CDN PKGBASEURL="$(epm tool eget --list --latest $URL/*)"linux
URL="https://download5.operacdn.com/pub/opera/desktop"
if ! check_url_is_accessible $URL ; then if ! check_url_is_accessible $PKGBASEURL ; then
URL="https://download3.operacdn.com/pub/opera/desktop" PKGBASEURL="$(epm tool eget --list --second-latest $URL/*)"linux
check_url_is_accessible $URL || fatal "Can't access to Opera CDN site $URL" check_url_is_accessible $PKGBASEURL || fatal "Can't find Opera package for Linux at $URL"
fi fi
PKGBASEURL="$(epm tool eget --list --latest $URL/*)"linux
PKGURL="$(epm tool eget --list --latest $PKGBASEURL "$(epm print constructname $PKGNAME "*" $arch deb)")" || fatal #" PKGURL="$(epm tool eget --list --latest $PKGBASEURL "$(epm print constructname $PKGNAME "*" $arch deb)")" || fatal #"
epm install "$PKGURL" || fatal epm install "$PKGURL" || fatal
exit exit
else else
# they put all branch here (rpm only): https://rpm.opera.com/rpm/
[ "$($DISTRVENDOR -s)" = "alt" ] && repack='--repack' || repack='' [ "$($DISTRVENDOR -s)" = "alt" ] && repack='--repack' || repack=''
epm install $repack https://rpm.opera.com/rpm/opera_$BRANCH-*-linux-release-x64-signed.rpm epm install $repack https://rpm.opera.com/rpm/opera_$BRANCH-*-linux-release-x64-signed.rpm
......
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