Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: src/scripts/common.sh

Issue 501153: Simplified counting CPUs. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scripts/build_platform_packages.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/common.sh
diff --git a/src/scripts/common.sh b/src/scripts/common.sh
index 25dee4a3ed6c634b6d287689e539a83ea97db76a..8b6fe5809d6e452018e1526d384cbec686ebbd54 100644
--- a/src/scripts/common.sh
+++ b/src/scripts/common.sh
@@ -12,7 +12,7 @@
# The number of jobs to pass to tools that can run in parallel (such as make
# and dpkg-buildpackage
-NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'`
+NUM_JOBS=`grep -c "^processor" /proc/cpuinfo`
# Store location of the calling script.
TOP_SCRIPT_DIR="${TOP_SCRIPT_DIR:-$(dirname $0)}"
« no previous file with comments | « src/scripts/build_platform_packages.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698