From 715e2231d335700f6caf65ad97cf480b05807330 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 16 Mar 2021 17:50:09 +0200 Subject: [PATCH] common-apps: clone only if not there --- scripts/common-apps-functions-source.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/common-apps-functions-source.sh b/scripts/common-apps-functions-source.sh index 830d521..be44670 100644 --- a/scripts/common-apps-functions-source.sh +++ b/scripts/common-apps-functions-source.sh @@ -30,13 +30,16 @@ function build_ninja() cd "${SOURCES_FOLDER_PATH}" - ( - xbb_activate + if [ ! -d "${SOURCES_FOLDER_PATH}/${ninja_src_folder_name}" ] + then + ( + xbb_activate - cd "${SOURCES_FOLDER_PATH}" - git_clone "${NINJA_GIT_URL}" "${NINJA_GIT_BRANCH}" \ - "${NINJA_GIT_COMMIT}" "${ninja_src_folder_name}" - ) + cd "${SOURCES_FOLDER_PATH}" + git_clone "${NINJA_GIT_URL}" "${NINJA_GIT_BRANCH}" \ + "${NINJA_GIT_COMMIT}" "${ninja_src_folder_name}" + ) + fi ( mkdir -p "${BUILD_FOLDER_PATH}/${ninja_folder_name}"