4
0
mirror of https://github.com/QuasarApp/CMakeProject.git synced 2025-04-30 15:44:32 +00:00
CMakeProject/initSubmodules.sh

12 lines
281 B
Bash
Raw Normal View History

2020-09-04 14:10:50 +03:00
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
done