duplicati.sh 586 Bytes
Newer Older
1 2 3 4 5 6 7
#!/bin/sh

PKGNAME=duplicati
DESCRIPTION="Duplicati from the official site"

. $(dirname $0)/common.sh

8
pkgtype="$(epm print info -p)"
9 10 11 12

# we have workaround for their postinstall script, so always repack rpm package
[ "$pkgtype" = "deb" ] || repack='--repack'

13 14
#PKG=$(epm tool eget --list --latest https://www.duplicati.com/download "duplicati-*$pkgtype") || fatal "Can't get package URL"
PKG=$(epm tool eget -O /dev/stdout https://updates.duplicati.com/beta/latest-installers.js | grep -i -o -E '"url": "(.+)"' | cut -d'"' -f4 | grep "duplicati.*$pkgtype")
15 16

epm install $repack "$PKG"