summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xPKGBUILD11
1 files changed, 6 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 45ede7071643..e8f1d0c85e2d 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -37,11 +37,12 @@ build() {
cmake .. -DMOAB_DIR=/opt/MOAB \
-DCMAKE_INSTALL_PREFIX=/opt/double-down
_ccores=$(nproc)
- if [ -z "${_ccores}" ]; then
- make
- else
- make -j ${_ccores}
- fi
+ # check if _ccores is a positive integer, if not, serial build
+ if [[ "${_ccores}" =~ ^[1-9][0-9]*$ ]]; then
+ make -j ${_ccores}
+ else
+ make
+ fi
}
package() {