-
-
Save ipodipad/8ef62dc988788ee189e8e23dd12a4d08 to your computer and use it in GitHub Desktop.
Parallel submodule fetch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
if [ $# -eq 0 ]; then | |
git submodule -q foreach 'echo $name' | xargs -n 1 -P 10 git-submodule-fetch | |
else | |
while [ $# -gt 0 ]; do | |
(cd $1; git fetch -q || echo "Failed to fetch $1">&2) | |
/bin/echo -n . | |
shift | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment