From 58b7e95aeb0d2c4e4f01e8eb0a18b684dfc47f29 Mon Sep 17 00:00:00 2001 From: Tali Auster Date: Sun, 17 Mar 2024 12:41:24 -0600 Subject: [PATCH] dev: control build jobs with $ALIRE_BUILD_JOBS This is just a minor quality-of-life improvement for packaging. Note that this also quotes the argument to echo so that if (somehow) $ALIRE_OS were set to a malicious value, no harm could be done. --- dev/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/build.sh b/dev/build.sh index d5b035a5e..79e79e15d 100755 --- a/dev/build.sh +++ b/dev/build.sh @@ -5,7 +5,8 @@ pushd $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) > /de . functions.sh popd > /dev/null +ALIRE_BUILD_JOBS="${ALIRE_BUILD_JOBS:-0}" export ALIRE_OS=$(get_OS) -echo Building with ALIRE_OS=$ALIRE_OS... -gprbuild -j0 -r -p -P `dirname $0`/../alr_env.gpr "$@" +echo "Building with ALIRE_OS=$ALIRE_OS..." +gprbuild "-j$ALIRE_BUILD_JOBS" -r -p -P `dirname $0`/../alr_env.gpr "$@"