Last active
December 17, 2018 06:59
-
-
Save Ivlyth/b09e8f968b512df89ffde31f61a48f32 to your computer and use it in GitHub Desktop.
generate `git submodule add` from pre-exists .gitmodules file
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
cat .gitmodules | grep 'url =' | awk -F ' = ' '{print $2}' | awk -F'/' '{print "git submodule add " $1 "/" $2 " repos/" substr($2, 0, index($2, ".") - 1) }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment