From 1fbf2378233875f8bf24d9a4545988de2205f691 Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 28 Feb 2024 10:35:35 -0500 Subject: [PATCH] remove lost and found dir if it exists w/ burnettk --- spiffworkflow-backend/bin/clone_process_models | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spiffworkflow-backend/bin/clone_process_models b/spiffworkflow-backend/bin/clone_process_models index 23d2ccf4..24a09188 100755 --- a/spiffworkflow-backend/bin/clone_process_models +++ b/spiffworkflow-backend/bin/clone_process_models @@ -30,4 +30,9 @@ if [[ -n "${SPIFFWORKFLOW_BACKEND_GIT_SSH_PRIVATE_KEY:-}" ]]; then echo "${SPIFFWORKFLOW_BACKEND_GIT_SSH_PRIVATE_KEY}" >"${SPIFFWORKFLOW_BACKEND_GIT_SSH_PRIVATE_KEY_PATH}" fi +# otherwise git clone will not clone since the directory is not empty +if [[ -d "${SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR}/lost+found" ]]; then + rm -r "${SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR}/lost+found" +fi + git clone -b "$SPIFFWORKFLOW_BACKEND_GIT_SOURCE_BRANCH" "$SPIFFWORKFLOW_BACKEND_GIT_PUBLISH_CLONE_URL" "$SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR"