summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/option.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/option.sh b/include/option.sh
index 8fc80aaa..eb792775 100755
--- a/include/option.sh
+++ b/include/option.sh
@@ -23,13 +23,14 @@ eval "$(setvars "" CONFIG_BOARD_DELL_E6400 CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \
CONFIG_HAVE_REFCODE_BLOB CONFIG_REFCODE_BLOB_FILE)"
threads=
-set | grep LBMK_THREADS 1>/dev/null 2>/dev/null || threads=$(nproc) || :
-[ -z "$threads" ] && threads=$LBMK_THREADS
-[ -z "$threads" ] && threads=1 # LBMK_THREADS not set, and nproc failed
+set | grep LBMK_THREADS 1>/dev/null 2>/dev/null && threads="$LBMK_THREADS"
+[ -z "$threads" ] && threads=1
expr "X$threads" : "X-\{0,1\}[0123456789][0123456789]*$" \
1>/dev/null 2>/dev/null || threads=1 # user specified a non-integer
+export LBMK_THREADS="$threads"
+
items()
{
rval=1