Here is a little thingy I wrote to figure out the latest GLPI release download URL. I didnt want to check out and clone the GIT branche.Its a snippet from a bigger script where I automated the recovery and update an entire GLPI installation. Hope you have fun with it
Simply put the code below in a bash script and run it.
VERSION=`wget -qO - "$@" https://github.com/glpi-project/glpi/releases/ | sed -nr 's/.*<a href="(.*\/download\/(.*)\/.*.tgz)">.*/\2/p' | sed -nr 's/([0-9.]{3})$/\1/p' | sort -r | head -1`; DOWNLOAD=`wget -qO - "$@" https://github.com/glpi-project/glpi/releases/ | sed -nr 's/.*<a href="(.*\/download\/(.*)\/.*.tgz)">.*/\1/p' | grep $VERSION`; echo "Version: $VERSION"; echo "Download link: $DOWNLOAD";
It will output something like:
[root@ovmtest scripts]# ./getlatest.sh Version: 9.4.2 Download link: https://github.com/glpi-project/glpi/releases/download/9.4.2/glpi-9.4.2.tgz