From: Silvio Rhatto Date: Mon, 27 Nov 2017 11:20:31 +0000 (-0200) Subject: Adds git-update-superproject X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f050bced48bc05c4fa1177ca5391ced2086bed27;p=utils-git.git Adds git-update-superproject --- 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