summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD9
1 files changed, 8 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9ff52b5974ce..57848368cada 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -50,7 +50,14 @@ prepare() {
}
build() {
- colcon build --merge-install
+ # Disable parallel build if RAM is low
+ if [[ $(free | grep -Po "Mem:\s+\K\d+") < 16000000 ]]; then
+ printf "\nRAM is smaller than 16 GB. Parallel build will be disabled for stability.\n\n"
+ export COLCON_EXTRA_ARGS="${COLCON_EXTRA_ARGS} --executor sequential"
+ fi
+
+ # Build
+ colcon build --merge-install ${COLCON_EXTRA_ARGS}
}
package() {