summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRobbert van der Helm2021-01-06 01:16:45 +0100
committerRobbert van der Helm2021-01-06 01:16:45 +0100
commit0ba609df0c2244975b0ee53f1e62620a2f8340e6 (patch)
tree60f363167f57af46ab40899f7ddf0c70374a9b95 /PKGBUILD
parent7b069b0f445df9022193e18e6bd7e0984e45fd28 (diff)
downloadaur-0ba609df0c2244975b0ee53f1e62620a2f8340e6.tar.gz
Disable concurrent builds at 4 GB of RAM
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 6 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 5010176def51..9a5377a5e3e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=yabridge-git
_pkgname=yabridge
pkgver=2.2.1.r508.g71eadff
-pkgrel=1
+pkgrel=2
pkgdesc="Yet Another VST bridge, run Windows VST2 plugins under Linux"
arch=('x86_64')
url="https://github.com/robbert-vdh/yabridge"
@@ -53,11 +53,13 @@ build() {
# The unity build takes can take up to 2 GB of RAM per target, so if the
# system does not have enough RAM to build everything at once we'll limit the
- # number of concurrent jobs to 3.
+ # number of concurrent jobs
total_memory=$(free --gibi --si | awk '/^Mem:/ { print $2 }')
- if [ "$total_memory" -le 8 ]; then
+ if [ "$total_memory" -le 4 ]; then
+ echo -e "\n$total_memory gigabytes of RAM detected, limiting the number of build jobs to 1\n"
+ ninja -C build -j1
+ elif [ "$total_memory" -le 8 ]; then
echo -e "\n$total_memory gigabytes of RAM detected, limiting the number of build jobs to 3\n"
-
ninja -C build -j3
else
ninja -C build