From d2494ea2490ac519c9b6a9a1b72a7a3f25a16452 Mon Sep 17 00:00:00 2001 From: Dimitris Papagiannis Date: Thu, 20 Jun 2024 16:26:52 +0200 Subject: [PATCH] Avoid deleting the auth directory --- deploy_dqmgui.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy_dqmgui.sh b/deploy_dqmgui.sh index bb09297..a1d8187 100755 --- a/deploy_dqmgui.sh +++ b/deploy_dqmgui.sh @@ -85,8 +85,8 @@ preliminary_checks() { # Delete installation (config & sw, does not delete state) if [ -d "${INSTALLATION_DIR:?}/${DMWM_GIT_TAG:?}" ]; then - echo "WARNING: $INSTALLATION_DIR/$DMWM_GIT_TAG exists, deleting contents" - rm -rf "${INSTALLATION_DIR:?}/${DMWM_GIT_TAG:?}/"* + echo "WARNING: $INSTALLATION_DIR/$DMWM_GIT_TAG exists, deleting contents (except auth)" + find "${INSTALLATION_DIR:?}/${DMWM_GIT_TAG:?}/" -maxdepth 1 -type d ! -name auth -exec rm -rf {} \; fi if [ -n "$DMWM_PRS" ]; then