Merge pull request #66 from LudovicRousseau/master

Fix regression: Fails on Mac OS X (again): tput: unknown terminfo capability 'AF'
This commit is contained in:
nojhan 2012-08-21 14:39:46 -07:00
commit e7244c6a43

View File

@ -72,7 +72,7 @@ fi
case $(uname) in
FreeBSD) LP_OS=FreeBSD ;;
DragonFly) LP_OS=FreeBSD ;;
Darwin) LP_OS=FreeBSD ;;
Darwin) LP_OS=Darwin ;;
SunOS) LP_OS=SunOS ;;
*) LP_OS=Linux ;;
esac
@ -147,7 +147,7 @@ fi
# Get cpu count
case "$LP_OS" in
Linux) _lp_CPUNUM=$( nproc 2>/dev/null || grep -c '^[Pp]rocessor' /proc/cpuinfo ) ;;
FreeBSD) _lp_CPUNUM=$( sysctl -n hw.ncpu ) ;;
FreeBSD|Darwin) _lp_CPUNUM=$( sysctl -n hw.ncpu ) ;;
SunOS) _lp_CPUNUM=$( kstat -m cpu_info | grep -c "module: cpu_info" ) ;;
esac
@ -161,7 +161,7 @@ case "$LP_OS" in
echo "$load"
}
;;
FreeBSD)
FreeBSD|Darwin)
_lp_cpu_load () {
local bol load eol
read bol load eol < $<( LANG=C sysctl -n vm.loadavg )