Commit 79c21706 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play wpsoffice: fix version getting

parent c72158b3
...@@ -9,8 +9,14 @@ TIPS="Run epm play wpsoffice=<version> to install some specific version" ...@@ -9,8 +9,14 @@ TIPS="Run epm play wpsoffice=<version> to install some specific version"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
VERSION=$(eget -O- https://www.wps.com/whatsnew/linux/ | grep -oP "\W(\d+\.\d+\.\d+\.\d+)\W" | grep -oP "\d+\.\d+\.\d+\.\d+" | head -n1)
VERSION="${VERSION}.XA"
fi
mversion=$(echo "$VERSION" | sed -e 's|\.XA$||' -e 's|.*\.||') mversion=$(echo "$VERSION" | sed -e 's|\.XA$||' -e 's|.*\.||')
pkgtype=$(epm print info -p) pkgtype=$(epm print info -p)
case $pkgtype in case $pkgtype in
rpm) rpm)
PKGURL="https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/$mversion/wps-office-${VERSION}-1.x86_64.rpm" PKGURL="https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/$mversion/wps-office-${VERSION}-1.x86_64.rpm"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment