mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 16:41:11 +02:00
Make default parallelization controllable.
Specifically, do this via env for the time being since each program doesn't necessarily have an option (nor warrant one). BUG=None TEST=None Change-Id: I26e7f06ad5d6a44a7826bfa8465b34154d21b6a3 Reviewed-on: https://gerrit.chromium.org/gerrit/22295 Tested-by: Brian Harring <ferringb@chromium.org> Commit-Ready: Brian Harring <ferringb@chromium.org> Reviewed-by: David James <davidjames@chromium.org>
This commit is contained in:
parent
34e0f953e3
commit
28bb01f53e
@ -10,7 +10,11 @@
|
|||||||
|
|
||||||
# The number of jobs to pass to tools that can run in parallel (such as make
|
# The number of jobs to pass to tools that can run in parallel (such as make
|
||||||
# and dpkg-buildpackage
|
# and dpkg-buildpackage
|
||||||
NUM_JOBS=$(grep -c "^processor" /proc/cpuinfo)
|
if [ -z "${NUM_JOBS}" ]; then
|
||||||
|
NUM_JOBS=$(grep -c "^processor" /proc/cpuinfo)
|
||||||
|
fi
|
||||||
|
# Ensure that any sub scripts we invoke get the max proc count.
|
||||||
|
export NUM_JOBS="${NUM_JOBS}"
|
||||||
|
|
||||||
# True if we have the 'pv' utility - also set up COMMON_PV_CAT for convenience
|
# True if we have the 'pv' utility - also set up COMMON_PV_CAT for convenience
|
||||||
COMMON_PV_OK=1
|
COMMON_PV_OK=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user