Parallelize with xargs

This commit is contained in:
Robert Schulze 2023-11-09 10:17:49 +00:00
parent fa470b16e5
commit fe397a3110
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
set -e set -e
WORKDIR=$(dirname "$0") GITDIR=$(git rev-parse --show-toplevel)
WORKDIR=$(readlink -f "${WORKDIR}")
"$WORKDIR/sparse-checkout/setup-sparse-checkout.sh" $GITDIR/contrib/sparse-checkout/setup-sparse-checkout.sh
git submodule init git submodule init
git submodule sync git submodule sync
git submodule update --depth=1 --jobs 16 git config --file $GITDIR/.gitmodules --get-regexp .*path | sed 's/[^ ]* //' | xargs -I _ --max-procs 64 git submodule update --depth=1 --single-branch _