From 87aae7d364feab4e278f5a742dfc2d81c4fcbf32 Mon Sep 17 00:00:00 2001 From: Steven de Ridder Date: Tue, 1 Feb 2022 14:38:20 +0100 Subject: [PATCH] script now correctly handles closed repo's through ssh instead of http --- scripts/setup_submodules | 27 +++++++++++++-------------- scripts/submodules.list | 7 ++++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/setup_submodules b/scripts/setup_submodules index 5c19076..0aad384 100755 --- a/scripts/setup_submodules +++ b/scripts/setup_submodules @@ -3,10 +3,8 @@ # =============================================== # == Setting some environment variables # =============================================== -GIT_URL_SUBS="http://gitlab.osdev.nl/open_source" -GIT_URL_SUBS_CLOSED="http://gitlab.osdev.nl/closed_source" - -OPEN_REPOS=("mqtt-cpp" "transqueue" "orm" "network" "jobscheduler" "global" "dbconnector" "logutils" "pugixml" "qt-mqtt" "iputils" "crypter" "qt-bluetooth" "versioning" "cmake") +GIT_URL_OPEN="http://gitlab.osdev.nl/open_source" +GIT_URL_CLOSED="git@gitlab.osdev.nl:closed_source" FUNC_RESULT="-1" @@ -102,18 +100,19 @@ function read_submodules() function add_submodules() { echo -e "Adding SubModule(s)." - for SUB_MODULE in ${SUB_MODULES} + for SUB_MODULE in ${SUB_MODULES_OPEN} do - echo -e "< ${SUB_MODULE} >" - if [[ "${OPEN_REPOS[*]}" =~ "${SUB_MODULE}" ]]; - then - git submodule add -f ${GIT_URL_SUBS}/${SUB_MODULE}.git submodules/${SUB_MODULE} - git config submodule.${SUB_MODULE}.url ${GIT_URL_SUBS}/${SUB_MODULE}.git - else - git submodule add -f ${GIT_URL_SUBS_CLOSED}/${SUB_MODULE}.git submodules/${SUB_MODULE} - git config submodule.${SUB_MODULE}.url ${GIT_URL_SUBS_CLOSED}/${SUB_MODULE}.git - fi + git submodule add -f ${GIT_URL_OPEN}/${SUB_MODULE}.git submodules/${SUB_MODULE} + git config submodule.${SUB_MODULE}.url ${GIT_URL_OPEN}/${SUB_MODULE}.git + done + + for SUB_MODULE in ${SUB_MODULES_CLOSED} + do + echo {GIT_URL_CLOSED}/${SUB_MODULE}.git + git submodule add -f ${GIT_URL_CLOSED}/${SUB_MODULE}.git submodules/${SUB_MODULE} + git config submodule.${SUB_MODULE}.url ${GIT_URL_CLOSED}/${SUB_MODULE}.git done + } # Name : get_submodules diff --git a/scripts/submodules.list b/scripts/submodules.list index a18ab6f..bea2cf4 100644 --- a/scripts/submodules.list +++ b/scripts/submodules.list @@ -1,6 +1,7 @@ -SUB_MODULES="versioning +SUB_MODULES_OPEN="versioning cmake logutils global -pugixml -config" +pugixml" + +SUB_MODULES_CLOSED="config" -- libgit2 0.21.4