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 b8796d0..324378f 100644 --- a/scripts/submodules.list +++ b/scripts/submodules.list @@ -1,5 +1,6 @@ -SUB_MODULES="versioning +SUB_MODULES_OPEN="versioning cmake -logutils -config +logutils" + +SUB_MODULES_CLOSED="config datatypes"