aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-27 09:20:31 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-27 09:20:31 -0200
commitf050bced48bc05c4fa1177ca5391ced2086bed27 (patch)
treefe179f40012a061eb68513cea8b1bdb897d69a17
parent9c0e2bc7618ba72cf00acba77b0e12e22a57144a (diff)
downloadutils-git-f050bced48bc05c4fa1177ca5391ced2086bed27.tar.gz
utils-git-f050bced48bc05c4fa1177ca5391ced2086bed27.tar.bz2
Adds git-update-superproject
-rwxr-xr-xgit-update-superproject19
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