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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user