aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2019-08-14 20:26:56 +0200
committerMichael Buesch <m@bues.ch>2019-08-14 20:26:56 +0200
commit39f9e76a77519475af2f98d205bdf0a5ec5d44aa (patch)
tree4c6d2bf7e2c0bc28bd7428ab9e90969010a37f61
parent08df1b68e28b5526504e72c6ecf4947e635609f0 (diff)
downloadpyprofibus-39f9e76a77519475af2f98d205bdf0a5ec5d44aa.tar.xz
pyprofibus-39f9e76a77519475af2f98d205bdf0a5ec5d44aa.zip
Add script update-submodules
Signed-off-by: Michael Buesch <m@bues.ch>
-rwxr-xr-xmaintenance/update-submodules17
1 files changed, 17 insertions, 0 deletions
diff --git a/maintenance/update-submodules b/maintenance/update-submodules
new file mode 100755
index 0000000..62a3d5b
--- /dev/null
+++ b/maintenance/update-submodules
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+basedir="$(dirname "$0")"
+[ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir"
+
+
+die()
+{
+ echo "$*" >&2
+ exit 1
+}
+
+echo "Updating git submodules..."
+cd "$basedir/.." || die "Failed to cd to basedir"
+git submodule update --init || die "git submodule update failed"
+
+exit 0
bues.ch cgit interface