From d6440e05e3bdaaa6274a3d8d551b014dd5026bca Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Thu, 17 Apr 2025 19:56:35 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20l'ex=C3=A9cution=20des=20scripts?= =?UTF-8?q?=20pr=C3=A9sents=20dans=20sh/local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rapport_bdd.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rapport_bdd.sh b/rapport_bdd.sh index 4dec20e..f6ba544 100644 --- a/rapport_bdd.sh +++ b/rapport_bdd.sh @@ -55,6 +55,23 @@ do cat sql/sql_header.txt $f | sqlplus -s / as sysdba >> ${HTML_FILE} done + # exécution des scripts dans sh/local si présents + # Chemin du dossier local + LOCAL_DIR="sh/local" + + # Exécution des scripts locaux si le dossier existe + if [ -d "$LOCAL_DIR" ]; then + echo "[INFO] Détection du dossier local : $LOCAL_DIR" + for script in "$LOCAL_DIR"/*.sh; do + [ -f "$script" ] || continue + echo "[INFO] Exécution du script local : $script" + bash "$script" + done + else + echo "[INFO] Aucun script local détecté dans ${LOCAL_DIR}." + fi + + # modification du html pour le CSS sed -i 's/$//g' ${HTML_FILE} cat sql/99_html_footer.html >> ${HTML_FILE}