Improve meta/submodules --init

Keep output of git "live" (Meaning that one can see live what submodule
is currently pulled) by not saving it first and then grepping but by
catching a failing grep when the output of git was empty.
This commit is contained in:
2020-08-25 14:21:15 +02:00
parent b384854a4f
commit 9566bd96c3

View File

@@ -9,10 +9,9 @@ case "$1" in
esac esac
if (( $INIT )); then if (( $INIT )); then
out="$(git submodule update --init --recursive --jobs 8 --depth 1 2>&1)" git submodule update --init --recursive --jobs 8 --depth 1 2>&1 \
if ! (( $? )) && [ -n "$out" ] ; then | grep "Cloning into" \
echo "$out" | grep "Cloning into" || ! (( ${PIPESTATUS[0]} ))
fi
else else
git submodule update --remote git submodule update --remote
fi fi