anydesk.sh 1.43 KB
Newer Older
1 2 3
#!/bin/sh

PKGNAME=anydesk
4
SUPPORTEDARCHES="x86_64 x86"
5
VERSION="$2"
6
DESCRIPTION="AnyDesk from the official site"
7

8
. $(dirname $0)/common.sh
9

10
arch=$(epm print info --distro-arch)
11 12 13 14 15 16 17 18
case $arch in
    x86_64|amd64)
        arch=$arch ;;
    i686|i386)
        arch=$arch ;;
    i586)
        arch=i686 ;;
    *)
19
        fatal "Unsupported arch $arch for $(epm print info -d)"
20 21
esac

22 23 24 25
# rpm packages have a release in their names
[ "$(epm print info -p)" = "rpm" ] && [ "$VERSION" != "*" ] && VERSION="$VERSION-1"


26 27 28 29 30
# current links:
# https://download.anydesk.com/rpm/anydesk_6.0.1-1_x86_64.rpm
# https://download.anydesk.com/os-specific/rhel8/anydesk-6.0.1-1.el8.x86_64.rpm
# https://download.anydesk.com/deb/anydesk_6.0.1-1_amd64.deb

31
PKGMASK="$(epm print constructname $PKGNAME "$VERSION" $arch '' '_')"
32 33 34

# we miss obsoleted libpangox on ALT, so use RHEL8 build
# lib.req: WARNING: /usr/bin/anydesk: library libpangox-1.0.so.0 not found
35
#[ "$(epm print info -s)" = "alt" ] && PKGMASK="os-specific/rhel8/$(epm print constructname $PKGNAME "*" $arch)"
36

37 38 39 40 41 42 43
if [ "$VERSION" = "*" ] ; then
    PKGURL="$(eget --list --latest https://download.anydesk.com/linux/ "./$PKGMASK")"
else
    # https://download.anydesk.com/linux/anydesk_6.3.0-1_amd64.deb
    # https://download.anydesk.com/linux/anydesk_6.3.0-1_x86_64.rpm
    PKGURL="https://download.anydesk.com/linux/$PKGMASK"
fi
44

45
install_pkgurl
46 47 48 49 50 51

echo
echo "Note: run
# serv anydesk on
to enable needed anydesk system service
"