]> gitweb @ CieloNegro.org - build-hc-pkg.git/commitdiff
detect_number_of_cpus: tiny fix
authorPHO <pho@cielonegro.org>
Thu, 23 Feb 2012 14:23:39 +0000 (23:23 +0900)
committerPHO <pho@cielonegro.org>
Thu, 23 Feb 2012 14:23:39 +0000 (23:23 +0900)
build-hc-pkg

index 48e674ba2d22c038d93f6d6e2368eaf2bf6f54e3..0c9069e613629c07e20bc6335d94be429c31d9bd 100755 (executable)
@@ -12,7 +12,7 @@ function detect_platform_type () {
 }
 
 function detect_number_of_cpus () {
-    if ! sysctl -n hw.ncpu; then
+    if ! sysctl -n hw.ncpu 2>/dev/null; then
         echo "WARNING: I don't know how to detect the number of processors on this platform." >&2
         echo "WARNING: GHC will be built using only 1 processor. Expect some slowdown." >&2
         echo 1