Add "parallel update" script to generate multiple markdown files simultaneously

This commit is contained in:
Tianon Gravi 2020-01-24 15:04:52 -08:00
parent b99152544d
commit b3a7329ba4
1 changed files with 11 additions and 0 deletions

11
parallel-update.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
images=( */ )
images=( "${images[@]%/}" )
: "${PARALLELISM:=$(( $(nproc) * 2 ))}"
xargs -rtn1 -P "$PARALLELISM" ./update.sh "$@" <<<"${images[*]}"