Created
March 25, 2014 22:25
-
-
Save rlane/9772766 to your computer and use it in GitHub Desktop.
update submodules
This file contains 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 | |
for S in submodules/*; do | |
echo "Updating $S" | |
git -C $S checkout --quiet master | |
git -C $S pull --quiet origin master | |
if ! git diff --quiet $S; then | |
(echo "update $(basename $S)"; echo; git submodule summary $S) | git commit -F- $S | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment