From b7174c8e4599fe75013ee34dc8e6279feb72684d Mon Sep 17 00:00:00 2001 From: sylvainrolland Date: Fri, 18 Aug 2017 11:31:48 +0200 Subject: [PATCH] change VERSION_GLPI for latest release change VERSION_GLPI for get latest release if undifined when container initialization. --- glpi-start.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/glpi-start.sh b/glpi-start.sh index a27fe8a..ce13baf 100644 --- a/glpi-start.sh +++ b/glpi-start.sh @@ -1,7 +1,10 @@ #!/bin/bash -VERSION_GLPI=9.1.4 -SRC_GLPI=https://github.com/glpi-project/glpi/releases/download/${VERSION_GLPI}/glpi-${VERSION_GLPI}.tgz +#Controle du choix de version ou prise de la latest +[[ ! "$VERSION_GLPI" ]] \ + && VERSION_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/latest | grep tag_name | cut -d '"' -f 4) + +SRC_GLPI="https://github.com/glpi-project/glpi/releases/download/${VERSION_GLPI}/glpi-${VERSION_GLPI}.tgz" TAR_GLPI=glpi-${VERSION_GLPI}.tgz FOLDER_GLPI=glpi/ FOLDER_WEB=/var/www/html/