realvnc-viewer.sh 759 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#!/bin/sh

PKGNAME=realvnc-vnc-viewer
SUPPORTEDARCHES="x86_64 armhf aarch64"
DESCRIPTION="Real VNC Viewer from the official site"

. $(dirname $0)/common.sh

pkgtype="$(epm print info -p)"
arch="$(epm print info -a)"

repack=''
[ "$(epm print info -s)" = "alt" ] && repack='--repack'

case $pkgtype-$arch in
    rpm-x86_64)
        PKG="VNC-Viewer-*-Linux-x64.rpm"
        ;;
    *-x86_64)
        PKG="VNC-Viewer-*-Linux-x64.deb"
        ;;
    *-aarch64)
        PKG="VNC-Viewer-*-Linux-ARM64.deb"
        ;;
    *-armhf)
        PKG="VNC-Viewer-*-Linux-ARM.deb"
        ;;
    *)
        fatal "Unsupported arch"
        ;;
esac

PKGURL=$(epm tool eget --list --latest https://www.realvnc.com/en/connect/download/viewer/ $PKG)

epm $repack install $PKGURL