realvnc-viewer.sh 1.1 KB
Newer Older
1 2 3 4
#!/bin/sh

PKGNAME=realvnc-vnc-viewer
SUPPORTEDARCHES="x86_64 armhf aarch64"
5
VERSION="$2"
6
DESCRIPTION="Real VNC Viewer from the official site"
7
URL="https://www.realvnc.com/en/connect/download/vnc/"
8 9 10

. $(dirname $0)/common.sh

11 12 13 14 15
# vendor packages has shorted version, so drop latest version part (buildid)
if [ "$VERSION" != "*" ] ; then
    VERSION="$(echo "$VERSION" | sed -e 's|\.[0-9][0-9][0-9].*||')"
fi

16 17 18 19 20
pkgtype="$(epm print info -p)"
arch="$(epm print info -a)"

case $pkgtype-$arch in
    rpm-x86_64)
21
        PKG="VNC-Viewer-$VERSION-Linux-x64.rpm"
22 23
        ;;
    *-x86_64)
24
        PKG="VNC-Viewer-$VERSION-Linux-x64.deb"
25 26
        ;;
    *-aarch64)
27
        PKG="VNC-Viewer-$VERSION-Linux-ARM64.deb"
28 29
        ;;
    *-armhf)
30
        PKG="VNC-Viewer-$VERSION-Linux-ARM.deb"
31 32 33 34 35 36
        ;;
    *)
        fatal "Unsupported arch"
        ;;
esac

37 38
# https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-7.10.0-Linux-x64.deb
# https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-7.10.0-Linux-x64.rpm
39
PKGURL=$(eget --list --latest https://www.realvnc.com/en/connect/download/viewer/ "$PKG")
40

41
install_pkgurl