diff options
-rwxr-xr-x | check | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -75,17 +75,38 @@ if [ "$master" = "y" ]; then fi fi -if [ "$submod" = "y" ]; then - sms=`git -C $dir submodule foreach --quiet --recursive 'echo $path'` +function submod () # <dir> +{ + # The --recursive option doesn't produce the complete path so we will + # have to recurse ourselves. + # + local sms=`git -C $1 submodule foreach --quiet 'echo -n "$path "'` + + #info "checking '$sms' in $1..." + + local sm= for sm in $sms; do - smd=$dir/$sm - br=`branch $smd` + local smd=$1/$sm + + #info "sumbodule '$sm' in '$smd'" + + local br=`branch $smd` if ! synced $smd $br; then info "submodule $smd is not updated" - r=1 + return 1 + fi + + if ! submod $smd; then + return 1 fi done +} + +if [ "$submod" = "y" ]; then + if ! submod $dir; then + r=1 + fi fi if [ "$clean" = "y" ]; then |