summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebvm-run4
1 files changed, 2 insertions, 2 deletions
diff --git a/debvm-run b/debvm-run
index edb01ad..972eac6 100755
--- a/debvm-run
+++ b/debvm-run
@@ -140,9 +140,9 @@ else
;;
esac
fi
-if test "$MAX_SMP" -gt 1; then
+if test -z "$MAX_SMP" || test "$MAX_SMP" -gt 1; then
NPROC=$(nproc)
- test "$NPROC" -gt "$MAX_SMP" && NPROC=$MAX_SMP
+ test -n "$MAX_SMP" && test "$NPROC" -gt "$MAX_SMP" && NPROC=$MAX_SMP
set -- -smp "$NPROC" "$@"
fi