Use GitHub API to retrieve the release download url

This commit is contained in:
Philippe CORTELLEZZI committed 2018-07-19 09:00:53 +02:00
1 parent 339ff3a2b4
commit 0dbd0e33e9
2 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -23,7 +23,8 @@ php-mbstring \
php-xml \
php-apcu-bc \
cron \
wget
wget \
jq
#Copie et execution du script pour l'installation et l'initialisation de GLPI
COPY glpi-start.sh /opt/
+3 -3
View File
@@ -8,8 +8,8 @@ if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset";
else echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.0/apache2/conf.d/timezone.ini;
fi
SRC_GLPI="https://github.com/glpi-project/glpi/releases/download/${VERSION_GLPI}/glpi-${VERSION_GLPI}.tgz"
TAR_GLPI=glpi-${VERSION_GLPI}.tgz
SRC_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/tags/${VERSION_GLPI} | jq .assets[0].browser_download_url | tr -d \")
TAR_GLPI=$(basename ${SRC_GLPI})
FOLDER_GLPI=glpi/
FOLDER_WEB=/var/www/html/
@@ -21,7 +21,7 @@ then
fi
#Téléchargement et extraction des sources de GLPI
if [ "$(ls ${FOLDER_WEB}${FOLDER_GLPI})" ];
if [ -d "${FOLDER_WEB}${FOLDER_GLPI}" ];
then
echo "GLPI is already installed"
else