rustdesk.sh 1.03 KB
Newer Older
1 2
#!/bin/sh

3
BASEPKGNAME=rustdesk
4
SUPPORTEDARCHES="x86_64 armhf"
5
VERSION="$2"
6 7 8
if [ "$VERSION" = "nightly" ] ; then
    SUPPORTEDARCHES="x86_64 aarch64"
fi
9
DESCRIPTION="RustDesk — Display and control your PC and Android devices"
10
PRODUCTALT="stable nightly"
11 12 13

. $(dirname $0)/common.sh

14
arch=$(epm print info -a)
15 16
pkgtype=deb

17 18 19 20
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"
21
else
22
    PKGNAME=rustdesk
23 24
    #rustdesk-1.1.9-raspberry-armhf.deb
    #rustdesk-1.1.9.deb
25 26 27
    [ "$VERSION" = "*" ] && VERSION="[0-9].[0-9].[0-9]"
    [ "$arch" = "armhf" ] && VERSION="$VERSION-raspberry-armhf"
    MASK="[0-9]/$PKGNAME-$VERSION.$pkgtype"
28 29
fi

30 31
PKGURL=$(epm tool eget --list --latest https://github.com/rustdesk/rustdesk/releases "$MASK") || fatal "Can't get package URL"
epm install $PKGURL || exit
32 33 34 35 36 37 38

cat <<EOF

Note: run
# serv rustdesk on
to enable needed rustdesk system service (daemon)
EOF