Skip to content

Instantly share code, notes, and snippets.

@Ivlyth
Last active December 17, 2018 06:59
Show Gist options
  • Save Ivlyth/b09e8f968b512df89ffde31f61a48f32 to your computer and use it in GitHub Desktop.
Save Ivlyth/b09e8f968b512df89ffde31f61a48f32 to your computer and use it in GitHub Desktop.
generate `git submodule add` from pre-exists .gitmodules file
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