synology-chat.sh 637 Bytes
Newer Older
1 2 3 4
#!/bin/sh

PKGNAME=synology-chat
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6 7 8 9
DESCRIPTION='Synology Chat Client from the official site'

. $(dirname $0)/common.sh

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

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

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

# fix spaces in the package name
epm tool eget -O $PKGNAME.deb "$urldir/Synology*.deb"

epm install $PKGNAME.deb