From 41e172fd9220936dc8a2d63a3d1f1e5e9c81c636 Mon Sep 17 00:00:00 2001
From: Andrew Bays <abays@redhat.com>
Date: Sat, 21 Dec 2024 09:58:16 +0000
Subject: [PATCH] Only clone OpenStack operator repo when not already present

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 798ae1d..1fe42ce 100644
--- a/Makefile
+++ b/Makefile
@@ -765,7 +765,7 @@ openstack_repo: export HASH=${OPENSTACK_COMMIT_HASH}
 openstack_repo: ## clones the openstack-operator repo
 	$(eval $(call vars,$@,openstack))
 	mkdir -p ${OPERATOR_BASE_DIR} ${OPERATOR_DIR} ${DEPLOY_DIR}
-	bash -c "CHECKOUT_FROM_OPENSTACK_REF=false scripts/clone-operator-repo.sh"
+	bash -c "test -d ${OPERATOR_BASE_DIR}/openstack-operator || CHECKOUT_FROM_OPENSTACK_REF=false scripts/clone-operator-repo.sh"
 
 .PHONY: openstack_deploy_prep
 openstack_deploy_prep: export KIND=OpenStackControlPlane