onlyoffice.sh 1.32 KB
Newer Older
1 2 3
#!/bin/sh

PKGNAME=onlyoffice-desktopeditors
4
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6
DESCRIPTION="ONLYOFFICE for Linux from the official site"
7
URL="www.onlyoffice.com"
8

9
. $(dirname $0)/common.sh
10

11 12 13 14 15 16 17 18 19 20 21
arch=$(epm print info --distro-arch)
case "$(epm print info -p)" in
  rpm)
      file=onlyoffice-desktopeditors.x86_64.rpm
      pkgtype=rpm
      ;;
  *)
      file=onlyoffice-desktopeditors_amd64.deb
      pkgtype=deb
      ;;
esac
22

23 24 25 26 27
case "$(epm print info -s)" in
  alt)
      arch=amd64
      file=onlyoffice-desktopeditors_amd64.deb
      pkgtype=deb
28

29
      if ! is_glibc_enough 2.32 ; then
30 31 32
          # need old glibc
          VERSION=7.3.3
      fi
33 34
      ;;
esac
35

36
if [ "$VERSION" = "*" ] ; then
37
    PKGURL="$(eget --list --latest https://github.com/ONLYOFFICE/DesktopEditors/releases "$file")"
38 39 40 41 42 43 44 45 46
else
    PKGURL="https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v$VERSION/$file"
fi

#https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v7.4.0/onlyoffice-desktopeditors.x86_64.rpm
#https://github.com/ONLYOFFICE/DesktopEditors/releases/download/v7.4.0/onlyoffice-desktopeditors_amd64.deb
#PKGURL="https://download.onlyoffice.com/install/desktop/editors/linux/"
#PKGURL="$(eget --list --latest https://github.com/ONLYOFFICE/DesktopEditors/releases $(epm print constructname $PKGNAME "$VERSION" $arch $pkgtype))"

47
install_pkgurl