Created
October 20, 2010 05:59
-
-
Save sriedel/635848 to your computer and use it in GitHub Desktop.
Post Commit hook to auto-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 | |
pushd . # save current place in filesystem | |
until [ -d .git ] || $(pwd) = "/" ; do # look for project root | |
cd .. | |
done | |
if [ -d .git ] ; then # if we found it... | |
git submodule update | |
fi | |
popd # reset to original place in filesystem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment