From 0541206033dc8ddce45380f3b5be958d86a2b223 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Sun, 12 Jun 2022 13:07:57 +0200 Subject: [PATCH] Use of GIT_CLONE_EXECUTED to check if clone was running --- update_psa_impl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/update_psa_impl b/update_psa_impl index f0047ad..d937a77 100755 --- a/update_psa_impl +++ b/update_psa_impl @@ -41,13 +41,16 @@ update_psa() { log_debug "$func:${LINENO}: fetch/merge updates..." - # Fetch new updates (using git) - if ! fetch_customer_updates; then - log_error "$func:${LINENO}: fetch no data for $customer_id"\ - "-> no files to update -> no psa update" - update_psa_false_alarm \ - "update request, but no change in $CUSTOMER_REPOSITORY_PATH" - # TODO + # Fetch new updates (using git). but only when repository has already been + # cloned. + if [ $GIT_CLONE_EXECUTED -eq 0 ]; then + if ! fetch_customer_updates; then + log_error "$func:${LINENO}: fetch no data for $customer_id"\ + "-> no files to update -> no psa update" + update_psa_false_alarm \ + "update request, but no change in $CUSTOMER_REPOSITORY_PATH" + # TODO + fi fi update_psa_pull_customer_repository # message to ISMAS