Created
March 3, 2016 03:35
-
-
Save ianblenke/086c52a5841cabf8a894 to your computer and use it in GitHub Desktop.
Do a full submodule clone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git submodule update --init --recursive ; git submodule | while read line ; do submodule=$(echo $line | awk '{print $2}'); if [ -f $submodule/.git ] ; then url=$(grep -2 $submodule .gitmodules | grep url | tail -1 | awk '{print $3}') ; rm -fr $submodule; git clone $url $submodule; fi ; done ; git submodule update --init --recursive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment