Commit cd8db06c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play rustdesk: rewrite file mask constructing

parent 23cd3399
#!/bin/sh
PKGNAME=rustdesk
BASEPKGNAME=rustdesk
SUPPORTEDARCHES="x86_64 armhf"
VERSION="$2"
if [ "$VERSION" = "nightly" ] ; then
SUPPORTEDARCHES="x86_64 aarch64"
fi
DESCRIPTION="RustDesk — Display and control your PC and Android devices"
PRODUCTALT="stable nightly"
......@@ -11,22 +14,21 @@ PRODUCTALT="stable nightly"
arch=$(epm print info -a)
pkgtype=deb
BRANCH=stable
if [ "$VERSION" = "nightly" ] ; then
BRANCH=nightly
SUPPORTEDARCHES="x86_64 aarch64"
MASK="$PKGNAME-*$arch*.$pkgtype"
# https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.2.0-aarch64-unknown-linux-gnu-ubuntu-18.04.deb
URL=$(epm tool eget --list --latest https://github.com/rustdesk/rustdesk/releases "$MASK") || fatal "Can't get package URL"
if [ "$PKGNAME" = "$BASEPKGNAME-nightly" ] ; then
PKGNAME=rustdesk
# https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.2.0-aarch64.deb
MASK="nightly/$PKGNAME-$VERSION-$arch.$pkgtype"
else
[ "$arch" = "armhf" ] && arch="raspberry-armhf" || arch="[0-9].[0-9].[0-9]"
MASK="$PKGNAME-$arch.$pkgtype"
PKGNAME=rustdesk
#rustdesk-1.1.9-raspberry-armhf.deb
#rustdesk-1.1.9.deb
[ "$VERSION" = "*" ] && VERSION="[0-9].[0-9].[0-9]"
[ "$arch" = "armhf" ] && VERSION="$VERSION-raspberry-armhf"
MASK="[0-9]/$PKGNAME-$VERSION.$pkgtype"
fi
URL=$(epm tool eget --list --latest https://github.com/rustdesk/rustdesk/releases "$MASK") || fatal "Can't get package URL"
epm install $URL || exit
PKGURL=$(epm tool eget --list --latest https://github.com/rustdesk/rustdesk/releases "$MASK") || fatal "Can't get package URL"
epm install $PKGURL || exit
cat <<EOF
......
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