Server-Root/init_modules.sh
2018-07-12 21:13:30 +01:00

12 lines
281 B
Bash
Executable File

#!/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