#!/bin/shPKGNAME=TonkeeperSUPPORTEDARCHES="x86_64 aarch64"VERSION="$2"DESCRIPTION="Tonkeeper desktop from the official site"URL="https://tonkeeper.com/desktop".$(dirname$0)/common.sharch="$(epm print info --distro-arch)"pkgtype="$(epm print info -p)"case"$pkgtype"inrpm)["$VERSION"="*"]&&VERSION="[0-9]*"||VERSION="$VERSION-1";; deb)PKGNAME=tonkeeper;;*)PKGNAME=tonkeeperpkgtype="deb";;esac# https://github.com/tonkeeper/tonkeeper-web/releases/download/v3.7.1/tonkeeper_3.7.1_amd64.deb# https://github.com/tonkeeper/tonkeeper-web/releases/download/v3.7.1/Tonkeeper-3.7.1-1.x86_64.rpmPKGURL=$(epm tool eget --list--latest https://github.com/tonkeeper/tonkeeper-web/releases $(epm print constructname $PKGNAME"$VERSION"$arch$pkgtype))|| fatal "Can't get package URL"repack=''["$(epm print info -s)"="alt"]&&repack='--repack'epm install$repack"$PKGURL"||exit