diff options
-rwxr-xr-x | git-update-superproject | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/git-update-superproject b/git-update-superproject new file mode 100755 index 0000000..d58d416 --- /dev/null +++ b/git-update-superproject @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Updates a superproject +# + +# Parameters +BASENAME="`basename $0`" + +# Check +if [ ! -e ".git" ]; then + echo "$BASENAME: not a git repository" + exit 1 +fi + +# Run +git pull $* +git submodule sync --recursive +git submodule update --recursive --init +git submodules-checkout-branch |