synology-drive.sh 710 Bytes
Newer Older
1 2 3 4
#!/bin/sh

PKGNAME=synology-drive
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6
DESCRIPTION='Synology Drive Client from the official site'
7
URL="https://www.synology.com/"
8 9 10

. $(dirname $0)/common.sh

11
is_stdcpp_enough "11.0" || VERSION="3.2.1"
12

13 14 15 16
# it is so strange, package name contains 3.x.x, but package version is 7.x.x
[ "$VERSION" = "*" ] && VERSION="[0-9]*" || VERSION="$(echo "$VERSION" | sed -e 's|^7|3|')"


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

20
PKGURL="$urldir/$PKGNAME-*.x86_64.deb"
21

22
install_pkgurl