Commit 87aae7d364feab4e278f5a742dfc2d81c4fcbf32
1 parent
02fc65bf
script now correctly handles closed repo's through ssh instead of http
Showing
2 changed files
with
17 additions
and
17 deletions
scripts/setup_submodules
@@ -3,10 +3,8 @@ | @@ -3,10 +3,8 @@ | ||
3 | # =============================================== | 3 | # =============================================== |
4 | # == Setting some environment variables | 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 | FUNC_RESULT="-1" | 9 | FUNC_RESULT="-1" |
12 | 10 | ||
@@ -102,18 +100,19 @@ function read_submodules() | @@ -102,18 +100,19 @@ function read_submodules() | ||
102 | function add_submodules() | 100 | function add_submodules() |
103 | { | 101 | { |
104 | echo -e "Adding SubModule(s)." | 102 | echo -e "Adding SubModule(s)." |
105 | - for SUB_MODULE in ${SUB_MODULES} | 103 | + for SUB_MODULE in ${SUB_MODULES_OPEN} |
106 | do | 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 | done | 114 | done |
115 | + | ||
117 | } | 116 | } |
118 | 117 | ||
119 | # Name : get_submodules | 118 | # Name : get_submodules |