From 4b3345673dfe70109dcbf70f4607a2acd22d3181 Mon Sep 17 00:00:00 2001 From: pedro Date: Tue, 6 Feb 2024 15:56:24 +0100 Subject: [PATCH] build__common.sh bugfix deployment dir --- build__common.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build__common.sh b/build__common.sh index 6ea5b72..77792dd 100644 --- a/build__common.sh +++ b/build__common.sh @@ -28,20 +28,21 @@ common_start() { # process idhubs instances for the purpose for idhub in ${idhubs}; do + idhub_dir="${idhub}__${target}" if [ "${persistence}" = "n" ]; then # no data persistence: cleanup previous possible data - rm -rf "./${idhub}" + rm -rf "./${idhub_dir}" fi # detect existing deployment - if [ -d "./${idhub}" ]; then - git -C "${idhub}" pull + if [ -d "./${idhub_dir}" ]; then + git -C "${idhub_dir}" pull # looks new else - echo "Detected new deployment, recreating git repos ${idhub}" - cp -rp IdHub "${idhub}" + echo "Detected new deployment, recreating git repos ${idhub_dir}" + cp -rp IdHub "${idhub_dir}" # ensure the copy does not contain a DB - rm -f "${idhub}/db.sqlite3" + rm -f "${idhub_dir}/db.sqlite3" fi done