guardant.sh 866 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
#!/bin/sh

PKGNAME=glds
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Guardant License Server from the official site"
URL="https://www.guardant.ru/support/users/download/1223/"

. $(dirname $0)/common.sh

11 12
[ "$VERSION" = "*" ] && VERSION="$(basename $(eget --list --latest https://download.guardant.ru/LM/Linux/ '*/'))"
[ -n "$VERSION" ] || fatal "Can't get version."
13 14 15 16 17

shortarch=x64

pkgtype="$(epm print info -p)"

18
# there are incorrect version in the package name
19 20 21 22 23
case "$pkgtype" in
    rpm)
        file="glds-*.x86_64.rpm"
        ;;
    deb)
24
        file="glds-*_amd64.deb"
25 26
        ;;
    *)
27
        file="glds-*_amd64.deb"
28 29 30
        ;;
esac

31
PKGURL=$(eget --list --latest https://download.guardant.ru/LM/Linux/$VERSION/$shortarch/ "$file")
32

33
install_pack_pkgurl "$VERSION"
34 35 36 37 38 39 40

cat <<EOF

Note: run
# serv glds on
to start Guardant License Server permanently
EOF