From 93b701a6373d9f240317eded8da8dfea30b956e9 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 31 Jul 2012 21:27:53 +0200 Subject: [PATCH] undo commit a00de370c58fe2c18a49944821e113617caff1c4, let Darwin be specific again --- liquidprompt.bash | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/liquidprompt.bash b/liquidprompt.bash index 4dd0aa7..353902f 100755 --- a/liquidprompt.bash +++ b/liquidprompt.bash @@ -80,7 +80,7 @@ OS="Linux" case $(uname) in "Linux" ) OS="Linux" ;; "FreeBSD") OS="FreeBSD" ;; - "Darwin") OS="FreeBSD" ;; + "Darwin") OS="Darwin" ;; "DragonFly") OS="FreeBSD" ;; "SunOS") OS="SunOS" ;; esac @@ -167,6 +167,11 @@ __cpunum_FreeBSD() sysctl -n hw.ncpu } +__cpunum_Darwin() +{ + __cpunum_FreeBSD +} + __cpunum_SunOS() { kstat -m cpu_info | grep "module: cpu_info" | wc -l @@ -189,6 +194,11 @@ __load_FreeBSD() echo -n "$load" } +__load_Darwin() +{ + __load_FreeBSD +} + __load_SunOS() { load=$(LANG=C uptime | awk '{print $10}'| sed -e 's/,//')