summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlukelabrie2024-01-27 00:40:29 +0100
committerlukelabrie2024-01-27 00:40:29 +0100
commitd76fd112b927adaaf4779c87dedd80466d6aaa98 (patch)
tree33c1bc740370dbf23b7f43d396727077e5c5e7cf
parent6f0fd951e7951e0397336d0bf7511fe55970d59f (diff)
downloadaur-d76fd112b927adaaf4779c87dedd80466d6aaa98.tar.gz
more robust parallel build
-rwxr-xr-xPKGBUILD11
1 files changed, 6 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a3c955bee850..45ede7071643 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -36,11 +36,12 @@ build() {
mkdir build && cd build
cmake .. -DMOAB_DIR=/opt/MOAB \
-DCMAKE_INSTALL_PREFIX=/opt/double-down
- _ccores=`cat /proc/cpuinfo |grep CPU|wc -l`
- if [ "x$1" != "x" ]; then
- _ccores=$1
- fi
- make -j ${_ccores}
+ _ccores=$(nproc)
+ if [ -z "${_ccores}" ]; then
+ make
+ else
+ make -j ${_ccores}
+ fi
}
package() {