Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 2014 01:06:41 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262509 - head/release
Message-ID:  <201402260106.s1Q16fxZ014390@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Wed Feb 26 01:06:41 2014
New Revision: 262509
URL: http://svnweb.freebsd.org/changeset/base/262509

Log:
  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

Modified:
  head/release/release.sh

Modified: head/release/release.sh
==============================================================================
--- head/release/release.sh	Wed Feb 26 01:00:00 2014	(r262508)
+++ head/release/release.sh	Wed Feb 26 01:06:41 2014	(r262509)
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402260106.s1Q16fxZ014390>