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

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

7
. $(dirname $0)/common.sh
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


arch=$($DISTRVENDOR --distro-arch)
case $arch in
    x86_64|amd64)
        arch=$arch ;;
    i686|i386)
        arch=$arch ;;
    i586)
        arch=i686 ;;
    *)
        fatal "Unsupported arch $arch for $($DISTRVENDOR -d)"
esac

# we have workaround for their postinstall script, so always repack rpm package
repack=''
24
[ "$($DISTRVENDOR -p)" = "deb" ] || repack='--repack'
25

26 27 28 29 30 31
# 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

# general msk
32
#PKGMASK="$($DISTRVENDOR -p)/$(epm print constructname $PKGNAME "*" $arch '' '_')"
33 34
# TODO: hack with version, there are too many files
PKGMASK="$(epm print constructname $PKGNAME "[6-9].[1-9]*" $arch '' '_')"
35 36 37

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

40
PKG="$(epm tool eget --list --latest https://download.anydesk.com/linux $PKGMASK)" || fatal "Can't get package URL"
41

42
epm $repack install "$PKG" || exit
43 44 45 46 47 48

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