about summary refs log tree commit diff
path: root/scripts/reset-submodules.sh
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-01-24 12:08:36 +0100
committerRory& <root@rory.gay>2024-01-24 12:08:36 +0100
commitebb775340a8198247113b9a3374cfda159a9fe3c (patch)
tree36ec2b971004d5a3bf9df7605d064554f22b3ea0 /scripts/reset-submodules.sh
parentLibMatrix update, refactor login page, add web manifest (diff)
downloadMatrixUtils-ebb775340a8198247113b9a3374cfda159a9fe3c.tar.xz
Minor cleanup of file tree
Diffstat (limited to 'scripts/reset-submodules.sh')
-rwxr-xr-xscripts/reset-submodules.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/reset-submodules.sh b/scripts/reset-submodules.sh
new file mode 100755
index 0000000..60f2267
--- /dev/null
+++ b/scripts/reset-submodules.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+find . -type d | grep --invert '\.git' | while read dir
+do
+    (
+        (git -C $dir submodule init 2>/dev/null) \
+        && (git -C $dir submodule update 2>/dev/null)
+    ) || echo $dir does not contain submodules
+done