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
if (( $INIT )); then
out="$(git submodule update --init --recursive --jobs 8 --depth 1 2>&1)"
if ! (( $? )) && [ -n "$out" ] ; then
echo "$out" | grep "Cloning into"
fi
git submodule update --init --recursive --jobs 8 --depth 1 2>&1 \
| grep "Cloning into" \
|| ! (( ${PIPESTATUS[0]} ))
else
git submodule update --remote
fi