about summary refs log tree commit diff
path: root/scripts/reset-submodules.sh
blob: 60f2267f1c9d911a2d81481359529da944133cb7 (plain) (blame)
1
2
3
4
5
6
7
8
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