19 lines
292 B
Bash
19 lines
292 B
Bash
|
# This script outputs the number of available processors/cores plus one.
|
||
|
|
||
|
case `uname` in
|
||
|
Linux)
|
||
|
wxPROC_COUNT=`nproc`
|
||
|
;;
|
||
|
|
||
|
Darwin)
|
||
|
wxPROC_COUNT=`sysctl -n hw.ncpu`
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
wxPROC_COUNT=0
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
((wxPROC_COUNT++))
|
||
|
echo $wxPROC_COUNT
|