summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-06-20 00:43:40 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-07 17:43:58 +0200
commit3eb8990a758501b0af6932c0a947f9cad201f96b (patch)
treece40ac10a06f0139529bd5f4a0d31c2a0eeacfc8
parent3972bd3b8067ab4b7a51228d45c67a169003dc3d (diff)
downloaddots-3eb8990a758501b0af6932c0a947f9cad201f96b.tar.gz
Add script to quickly gather submodule commits here
-rwxr-xr-xsubmodule.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/submodule.sh b/submodule.sh
new file mode 100755
index 0000000..e5792cd
--- /dev/null
+++ b/submodule.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env fish
+
+set -l updated
+set -l msgs
+for submodule in (git submodule | awk '{ print $2 }')
+ set diff_msg (git diff --submodule "$submodule")
+ if test -n "$diff_msg"
+ set -a updated "$submodule"
+ set -a msgs $diff_msg
+ end
+end
+
+if test -n "$updated"
+ git add $updated
+ git commit -m "Updated submodules: $(string join ', ' $updated)" \
+ -m "$(string collect -N $msgs)"
+end