Use tr on OSX to trim whitespace

This commit is contained in:
Dylan 2016-03-27 14:05:22 +11:00
parent 2edad96936
commit 6296cf7410

View file

@ -838,8 +838,7 @@ getcpu () {
;; ;;
"Mac OS X") "Mac OS X")
cpu="$(sysctl -n machdep.cpu.brand_string)" cpu="$(sysctl -n machdep.cpu.brand_string | tr -s \ )"
cpu=${cpu//[[:space:]]/ }
cores=$(sysctl -n hw.ncpu) cores=$(sysctl -n hw.ncpu)
;; ;;