From 4972b93f188f761fcca8590da4a8c0ec85632ab6 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Fri, 25 Dec 2020 23:28:28 +0100 Subject: [PATCH] chore: adaptation du script d'upgrade --- functions.sh | 14 ++++++++++++++ update.sh | 34 +++++++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/functions.sh b/functions.sh index 8c36921..f6c9866 100644 --- a/functions.sh +++ b/functions.sh @@ -21,3 +21,17 @@ function install_site() { cd ../ echo "" } + +## update_site +## Update a site inside kobold.city +## S1: the folder of the site +function update_site() { + echo "# $1" + cd $1 + echo "## Pull" + git pull + echo "## Compilation" + sh generate.sh + cd ../ + echo "" +} diff --git a/update.sh b/update.sh index dcf250c..b9018d3 100755 --- a/update.sh +++ b/update.sh @@ -1,9 +1,25 @@ -cd hosted/rulebook -git pull -sh generate.sh -cd ../kazhnuz.space -git pull -sh generate.sh -cd ../kobold.city -git pull -sh generate.sh +################################################################################ +# KOBOLD CITY - Mise a Jour +# Mise a jour des sites présents +################################################################################ +source functions.sh + +echo "KOBOLD CITY - Démarage du scrit de MaJ" + +echo "" + +# 1 - Deplacement vers le dossier hosted +cd hosted + +echo "" + +# 2 - MaJ des différents sites +update_site kobold.city https://git.kobold.cafe/kobold-city/kobold.city +update_site rulebook https://git.kobold.cafe/jdr/rulebook +update_site kazhnuz.space https://git.kobold.cafe/kobold-city/kazhnuz.space + +# On sort du dossier temporaire pour la fin du script +cd ../ + +# Fin du script +echo "Fin du script"