realvnc-server.sh 786 Bytes
Newer Older
1 2 3 4
#!/bin/sh

PKGNAME=realvnc-vnc-server
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6
DESCRIPTION="Real VNC Server 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
        mask="VNC-Server-$VERSION-Linux-x64.rpm"
22 23
        ;;
    *-x86_64)
24
        mask="VNC-Server-$VERSION-Linux-x64.deb"
25 26 27 28 29 30
        ;;
    *)
        fatal "Unsupported arch"
        ;;
esac

31
PKGURL=$(eget --list --latest https://www.realvnc.com/en/connect/download/vnc/ "$mask")
32
install_pkgurl