Commit 95294c3d519117768cd4e7d11f9c51255eedb8ca
1 parent
39a9e98f
divided submodules.list into open and closed.
Showing
2 changed files
with
17 additions
and
17 deletions
scripts/setup_submodules
... | ... | @@ -3,10 +3,8 @@ |
3 | 3 | # =============================================== |
4 | 4 | # == Setting some environment variables |
5 | 5 | # =============================================== |
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") | |
6 | +GIT_URL_OPEN="http://gitlab.osdev.nl/open_source" | |
7 | +GIT_URL_CLOSED="git@gitlab.osdev.nl:closed_source" | |
10 | 8 | |
11 | 9 | FUNC_RESULT="-1" |
12 | 10 | |
... | ... | @@ -102,18 +100,19 @@ function read_submodules() |
102 | 100 | function add_submodules() |
103 | 101 | { |
104 | 102 | echo -e "Adding SubModule(s)." |
105 | - for SUB_MODULE in ${SUB_MODULES} | |
103 | + for SUB_MODULE in ${SUB_MODULES_OPEN} | |
106 | 104 | do |
107 | - echo -e "< ${SUB_MODULE} >" | |
108 | - if [[ "${OPEN_REPOS[*]}" =~ "${SUB_MODULE}" ]]; | |
109 | - then | |
110 | - git submodule add -f ${GIT_URL_SUBS}/${SUB_MODULE}.git submodules/${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 submodules/${SUB_MODULE} | |
114 | - git config submodule.${SUB_MODULE}.url ${GIT_URL_SUBS_CLOSED}/${SUB_MODULE}.git | |
115 | - fi | |
105 | + git submodule add -f ${GIT_URL_OPEN}/${SUB_MODULE}.git submodules/${SUB_MODULE} | |
106 | + git config submodule.${SUB_MODULE}.url ${GIT_URL_OPEN}/${SUB_MODULE}.git | |
107 | + done | |
108 | + | |
109 | + for SUB_MODULE in ${SUB_MODULES_CLOSED} | |
110 | + do | |
111 | + echo {GIT_URL_CLOSED}/${SUB_MODULE}.git | |
112 | + git submodule add -f ${GIT_URL_CLOSED}/${SUB_MODULE}.git submodules/${SUB_MODULE} | |
113 | + git config submodule.${SUB_MODULE}.url ${GIT_URL_CLOSED}/${SUB_MODULE}.git | |
116 | 114 | done |
115 | + | |
117 | 116 | } |
118 | 117 | |
119 | 118 | # Name : get_submodules | ... | ... |