synology-chat.sh 652 Bytes
Newer Older
1 2
#!/bin/sh

Vitaly Lipatov's avatar
Vitaly Lipatov committed
3
PKGNAME=synology-chat
4
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6
DESCRIPTION='Synology Chat Client from the official site'
7
URL="https://synology.com"
8 9 10

. $(dirname $0)/common.sh

11 12
[ "$VERSION" = "*" ] && VERSION="[0-9]*"

13
urldir="$(eget --list https://archive.synology.com/download/Utility/ChatClient "/$VERSION-*" | head -n1)"
14
[ -n "$urldir" ] || fatal "Can't get dir for $VERSION version on https://archive.synology.com/download/Utility/ChatClient"
15 16 17 18 19 20

# use temp dir
PKGDIR="$(mktemp -d)"
trap "rm -fr $PKGDIR" EXIT
cd $PKGDIR || fatal

21
PKGURL="$PKGNAME.deb"
22
# fix spaces in the package name
23
eget -O $PKGURL "$urldir/Synology*.deb"
24

25
install_pkgurl