Merge pull request #36 from curbengh/version-parse

fix: new download page
This commit is contained in:
Antonio Faccioli 2024-02-02 11:48:20 +01:00 committed by GitHub
commit 5909bede0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -360,11 +360,11 @@ esac
set +e
if [[ $pathVersion == *"fresh"* ]] ; then
nrVersion=$(curl "https://www.libreoffice.org/download/download" | grep -o -e "/stable/.*/" | cut -d "/" -f 3 | head -n 1)
nrVersion=$(curl "https://www.libreoffice.org/download/download-libreoffice/" | grep -o -e "/stable/.*/" | cut -d "/" -f 3 | head -n 1)
path="https://download.documentfoundation.org/libreoffice/stable/${nrVersion}/deb/${pathArch}/"
package="LibreOffice_${nrVersion}_Linux_${arch}_deb.tar.gz"
elif [[ $pathVersion == *"still"* ]] ; then
nrVersion=$(curl "https://www.libreoffice.org/download/download" | grep -o -e "/stable/.*/" | cut -d "/" -f 3 | head -n 3 | tail -n 1)
nrVersion=$(curl "https://www.libreoffice.org/download/download-libreoffice/" | grep -o -e "/stable/.*/" | cut -d "/" -f 3 | head -n 3 | tail -n 1)
path="https://download.documentfoundation.org/libreoffice/stable/${nrVersion}/deb/${pathArch}/"
package="LibreOffice_${nrVersion}_Linux_${arch}_deb.tar.gz"
elif [[ $pathVersion == *"daily"* ]] ; then