summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2022-03-27 05:06:45 +0200
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2022-03-27 05:06:45 +0200
commit99278419e918d1dc0315059dec8fe9139e3a2cae (patch)
treef416db51f178c8ad61e8a2d49d69ea4ef2bf9169
parente937c9cec4f4c06365d1d3ed847194082f71d0b9 (diff)
downloadmidipix_build-99278419e918d1dc0315059dec8fe9139e3a2cae.tar.bz2
midipix_build-99278419e918d1dc0315059dec8fe9139e3a2cae.tar.xz
devbuild.sh: updated.
subr/build_init.subr:buildp_init_getopts(): implement -p max.
-rwxr-xr-xdevbuild.sh4
-rw-r--r--subr/build_init.subr3
2 files changed, 5 insertions, 2 deletions
diff --git a/devbuild.sh b/devbuild.sh
index 5eae0b9b..d0e1b0b7 100755
--- a/devbuild.sh
+++ b/devbuild.sh
@@ -23,8 +23,8 @@ devbuild_midipix() {
};
devbuild_all() {
- ./build.sh -a nt64 -b release -D minipix,rpm,zipdist -F ipv4 -p "${1:-auto}" -v &&\
- ./build.sh -a nt64 -b debug -D minipix,rpm,zipdist -F ipv4 -p "${1:-auto}" -v;
+ ./build.sh -a nt64 -b release -D minipix,rpm,zipdist -p max -v "${@}" &&\
+ ./build.sh -a nt64 -b debug -D minipix,rpm,zipdist -p max -v "${@}";
};
devbuild_mirror() {
diff --git a/subr/build_init.subr b/subr/build_init.subr
index e83e5afd..e6459a86 100644
--- a/subr/build_init.subr
+++ b/subr/build_init.subr
@@ -243,6 +243,9 @@ buildp_init_getopts() {
else
ARG_PARALLEL=$((${ARG_PARALLEL}/2));
fi; ;;
+ max) if ! ARG_PARALLEL="$(rtl_get_cpu_count)"; then
+ _rc=1; _status="failed to get CPU count.";
+ fi; ;;
"") ARG_PARALLEL=1; ;;
*) if ! rtl_isnumber "${ARG_PARALLEL}"; then
_rc=1; _status="invalid jobs count \`${ARG_PARALLEL}'.";