myoffice.sh 1.04 KB
Newer Older
1 2 3
#!/bin/sh

PKGNAME=myoffice-standard-home-edition
4
SKIPREPACK=1
5
SUPPORTEDARCHES="x86_64"
6
VERSION="$2"
7
DESCRIPTION="MyOffice Standart Home Edition for Linux from the official site"
8
URL="https://myoffice.ru/products/standard-home-edition/"
9 10 11

. $(dirname $0)/common.sh

12
pkgtype=$(epm print info -p)
13

14 15 16
# /var/lib/dpkg/info/myoffice-standard-home-edition.postinst: line 62: xdg-desktop-menu: command not found
epm assure xdg-desktop-menu xdg-utils

17 18 19 20 21 22
delim="-" 
if [ "$pkgtype" != "rpm" ] ; then
    delim="_"
    pkgtype="deb"
fi

23 24
# https://preset.myoffice-app.ru/myoffice-standard-home-edition-2.3.0-x86_64.rpm
# https://preset.myoffice-app.ru/myoffice-standard-home-edition_2.3.0_amd64.deb
25 26 27
# https://preset.myoffice-app.ru/myoffice-standard-home-edition-3.2-139.x86_64.rpm

PKGMASK="$(epm print constructname $PKGNAME "$VERSION" "" "$pkgtype" "$delim")"
28 29 30 31 32
if [ "$VERSION" = "*" ] ; then
    PKGURL="$(eget --list --latest https://myoffice.ru/products/standard-home-edition/ "$PKGMASK")"
else
    PKGURL="https://preset.myoffice-app.ru/$PKGMASK"
fi
33

34
epm install "$PKGURL"