Commit 25f7d9bc5645fe6c556426a4a1e8c1bb4eca3ec7
1 parent
b630d714
Adjusted script to check closed_source if repo does not exist in open_source
Showing
1 changed file
with
12 additions
and
2 deletions
scripts/setup_submodules
... | ... | @@ -4,6 +4,10 @@ |
4 | 4 | # == Setting some environment variables |
5 | 5 | # =============================================== |
6 | 6 | GIT_URL_SUBS="http://gitlab.osdev.nl/open_source" |
7 | +GIT_URL_SUBS_CLOSED="http://gitlab.osdev.nl/closed_source" | |
8 | + | |
9 | +OPEN_REPOS=("mqtt-cpp" "transqueue" "orm" "network" "jobscheduler" "global" "dbconnector" "logutils" "pugixml" "qt-mqtt" "iputils" "crypter" "qt-bluetooth" "versioning" "cmake") | |
10 | + | |
7 | 11 | FUNC_RESULT="-1" |
8 | 12 | |
9 | 13 | # Name : print_usage_exit() |
... | ... | @@ -101,8 +105,14 @@ function add_submodules() |
101 | 105 | for SUB_MODULE in ${SUB_MODULES} |
102 | 106 | do |
103 | 107 | echo -e "< ${SUB_MODULE} >" |
104 | - git submodule add -f ${GIT_URL_SUBS}/${SUB_MODULE}.git ${SUB_MODULE} | |
105 | - git config submodule.${SUB_MODULE}.url ${GIT_URL_SUBS}/${SUB_MODULE}.git | |
108 | + if [[ "${OPEN_REPOS[*]}" =~ "${SUB_MODULE}" ]]; | |
109 | + then | |
110 | + git submodule add -f ${GIT_URL_SUBS}/${SUB_MODULE}.git ${SUB_MODULE} | |
111 | + git config submodule.${SUB_MODULE}.url ${GIT_URL_SUBS}/${SUB_MODULE}.git | |
112 | + else | |
113 | + git submodule add -f ${GIT_URL_SUBS_CLOSED}/${SUB_MODULE}.git ${SUB_MODULE} | |
114 | + git config submodule.${SUB_MODULE}.url ${GIT_URL_SUBS_CLOSED}/${SUB_MODULE}.git | |
115 | + fi | |
106 | 116 | done |
107 | 117 | } |
108 | 118 | ... | ... |