summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlukelabrie2024-01-27 12:16:38 +0100
committerlukelabrie2024-01-27 12:16:38 +0100
commit9b55e2a9d7dcec76640e3cb754b42376496b4e56 (patch)
treed91ea28b305ba983854d901eaaeb49f8c7192cc0
parent172a43e27e37f4e4ed0da39273d388c9c7ecb94c (diff)
downloadaur-9b55e2a9d7dcec76640e3cb754b42376496b4e56.tar.gz
more robust parallel build
-rwxr-xr-xPKGBUILD13
1 files changed, 7 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f9962b318cb7..6b04e66291af 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -55,12 +55,13 @@ build() {
-DOPENMC_USE_MPI=ON \
-DHDF5_PREFER_PARALLEL=ON \
-DCMAKE_INSTALL_PREFIX=/opt/openmc
- _ccores=$(nproc)
- if [ -z "${_ccores}" ]; then
- make
- else
- make -j ${_ccores}
- fi
+ _ccores=$(nproc)
+ # check if _ccores is a positive integer, if not, serial build
+ if [[ "${_ccores}" =~ ^[1-9][0-9]*$ ]]; then
+ make -j ${_ccores}
+ else
+ make
+ fi
# build python layer
python -m build --wheel --no-isolation ../