aboutsummaryrefslogtreecommitdiff
path: root/release/release.sh
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-02-26 01:06:41 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-02-26 01:06:41 +0000
commit2e314957a9491498f1ddccd4fe27a32539e3bffd (patch)
tree5291667e095c148a3f50eaa0e0f189715e809c2e /release/release.sh
parent5bcd30f3b1e1c93b1aa41c5ec9a909a2a9a9842f (diff)
downloadsrc-2e314957a9491498f1ddccd4fe27a32539e3bffd.tar.gz
src-2e314957a9491498f1ddccd4fe27a32539e3bffd.zip
Rework how WORLD_FLAGS and KERNEL_FLAGS are set, to remove an
unnecessary expr(1) call. Inspired by: hrs (a few months ago) MFC after: 1 week X-MFC-With: r262499, r262505 Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=262509
Diffstat (limited to 'release/release.sh')
-rwxr-xr-xrelease/release.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/release/release.sh b/release/release.sh
index 0a373cc0559a..9ca711ed3491 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -64,11 +64,9 @@ SRC_CONF="/dev/null"
# The number of make(1) jobs, defaults to the number of CPUs available for
# buildworld, and half of number of CPUs available for buildkernel.
-NCPU=$(sysctl -n hw.ncpu)
-if [ ${NCPU} -gt 1 ]; then
- WORLD_FLAGS="-j${NCPU}"
- KERNEL_FLAGS="-j$(expr ${NCPU} / 2)"
-fi
+WORLD_FLAGS="-j$(sysctl -n hw.ncpu)"
+KERNEL_FLAGS="-j$(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2))"
+
MAKE_FLAGS="-s"
# The name of the kernel to build, defaults to GENERIC.