Commit 97317205 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play.d: add override_pkgname and use it

parent 805b80c1
...@@ -30,7 +30,7 @@ if [ -z "$PKGURL" ] ; then ...@@ -30,7 +30,7 @@ if [ -z "$PKGURL" ] ; then
# force use beta if can't get stable version # force use beta if can't get stable version
if [ "$PKGNAME" = "$BASEPKGNAME" ] ; then if [ "$PKGNAME" = "$BASEPKGNAME" ] ; then
TOREMOVEPKG=$PKGNAME TOREMOVEPKG=$PKGNAME
PKGNAME=$BASEPKGNAME-beta override_pkgname "$BASEPKGNAME-beta"
PKGURL=$(eget --list --latest https://github.com/brave/brave-browser/releases "$(epm print constructname $PKGNAME "$VERSION")") PKGURL=$(eget --list --latest https://github.com/brave/brave-browser/releases "$(epm print constructname $PKGNAME "$VERSION")")
[ -n "$PKGURL" ] || fatal "Can't get package URL" [ -n "$PKGURL" ] || fatal "Can't get package URL"
......
...@@ -98,6 +98,12 @@ warn_version_is_not_supported() ...@@ -98,6 +98,12 @@ warn_version_is_not_supported()
[ "$VERSION" = "*" ] || echo -e "\nWarning: Specifying the version is not supported by vendor. Downloading latest version ...\n" [ "$VERSION" = "*" ] || echo -e "\nWarning: Specifying the version is not supported by vendor. Downloading latest version ...\n"
} }
override_pkgname()
{
PKGNAME="$1"
export EEPM_INTERNAL_PKGNAME="$PKGNAME"
}
get_latest_version() get_latest_version()
{ {
local ver local ver
......
...@@ -15,12 +15,12 @@ arch="amd64" ...@@ -15,12 +15,12 @@ arch="amd64"
epm install --skip-installed ffmpeg-plugin-browser || epm install --skip-installed chromium-codecs-ffmpeg-extra || epm play chromium-codecs-ffmpeg-extra epm install --skip-installed ffmpeg-plugin-browser || epm install --skip-installed chromium-codecs-ffmpeg-extra || epm play chromium-codecs-ffmpeg-extra
if [ "$(epm print info -p)" = "rpm" ] ; then if [ "$(epm print info -p)" = "rpm" ] ; then
PKGNAME="${PKGNAME/-/_}" override_pkgname "${PKGNAME/-/_}"
# they put all branch here (rpm only): https://rpm.opera.com/rpm/ # they put all branch here (rpm only): https://rpm.opera.com/rpm/
[ "$(epm print info -s)" = "alt" ] && repack='--repack' || repack='' [ "$(epm print info -s)" = "alt" ] && repack='--repack' || repack=''
PKGURL="https://rpm.opera.com/rpm/$PKGNAME-$VERSION-linux-release-x64-signed.rpm" PKGURL="https://rpm.opera.com/rpm/$PKGNAME-$VERSION-linux-release-x64-signed.rpm"
epm install $repack $PKGURL epm install $repack "$PKGURL"
exit exit
fi fi
......
...@@ -15,11 +15,8 @@ case "$pkgtype" in ...@@ -15,11 +15,8 @@ case "$pkgtype" in
rpm) rpm)
[ "$VERSION" = "*" ] && VERSION="[0-9]*" || VERSION="$VERSION-1" [ "$VERSION" = "*" ] && VERSION="[0-9]*" || VERSION="$VERSION-1"
;; ;;
deb)
PKGNAME=tonkeeper
;;
*) *)
PKGNAME=tonkeeper override_pkgname "tonkeeper"
pkgtype="deb" pkgtype="deb"
;; ;;
esac esac
......
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