diff options
author | lukelabrie | 2024-01-27 00:40:29 +0100 |
---|---|---|
committer | lukelabrie | 2024-01-27 00:40:29 +0100 |
commit | d76fd112b927adaaf4779c87dedd80466d6aaa98 (patch) | |
tree | 33c1bc740370dbf23b7f43d396727077e5c5e7cf | |
parent | 6f0fd951e7951e0397336d0bf7511fe55970d59f (diff) | |
download | aur-d76fd112b927adaaf4779c87dedd80466d6aaa98.tar.gz |
more robust parallel build
-rwxr-xr-x | PKGBUILD | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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() { |