]> gitweb @ CieloNegro.org - build-hc-pkg.git/commitdiff
#cpu detection for NetBSD
authorPHO <pho@cielonegro.org>
Thu, 23 Feb 2012 10:20:27 +0000 (19:20 +0900)
committerPHO <pho@cielonegro.org>
Thu, 23 Feb 2012 10:20:27 +0000 (19:20 +0900)
build-hc-pkg

index 87e34ef9ef0b63e70f6ca1993ff8d25a14b0810a..27bf1fdd72d420a763af6375c0704badc56c53b0 100755 (executable)
@@ -16,7 +16,10 @@ function detect_number_of_cpus () {
 
     case "$platform" in
         *-*-darwin)
-            ioreg -r -c IOCPU | fgrep -c IOCPUNumber
+            ioreg -r -c IOCPU | fgrep -c \"IOCPUNumber\"
+            ;;
+        *-*-netbsd*)
+            cat /proc/cpuinfo | grep -cE 'processor[[:space:]]*:'
             ;;
         *)
             echo "WARNING: I don't know how to detect the number of processors on this platform." >&2