Commit cd8db06c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play rustdesk: rewrite file mask constructing

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