]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
perlcheck: parallelize
authorViktor Szakats <commit@vsz.me>
Fri, 26 Sep 2025 18:57:16 +0000 (20:57 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 26 Sep 2025 21:50:53 +0000 (23:50 +0200)
Follow-up to 34b1e146e42f2dbac5c89414a2a0458a8729a255 #18745

Closes #18750

scripts/perlcheck.sh

index be0c0e1c870f54b2f512cf44c16d921018bd6f9f..7de0f6dbb559eaa0041660cc9b04504633afc343 100755 (executable)
@@ -32,6 +32,10 @@ set -eu
 
 cd "$(dirname "$0")"/..
 
+procs=6
+command -v nproc >/dev/null && procs="$(nproc)"
+echo "parallel: ${procs}"
+
 {
   if [ -n "${1:-}" ]; then
     for A in "$@"; do printf "%s\n" "$A"; done
@@ -44,4 +48,4 @@ cd "$(dirname "$0")"/..
     # strip off the leading ./ to make the grep regexes work properly
     find . -type f \( -name '*.pl' -o -name '*.pm' \) | sed 's@^\./@@'
   fi
-} | xargs -n 1 perl -c -Itests
+} | xargs -n 1 -P "${procs}" perl -c -Itests