From 44d1b3eab649c4e8108ab6e6bec1e658995192e2 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 16 Apr 2009 12:55:52 -0500 Subject: [PATCH] bin/cpu-freq: always report in GHz -Dustin Kirkland Thu, 16 Apr 2009 12:55:35 -0500 --- bin/cpu-freq | 10 +++------- debian/changelog | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/cpu-freq b/bin/cpu-freq index 0c39d022..a627872d 100755 --- a/bin/cpu-freq +++ b/bin/cpu-freq @@ -19,11 +19,7 @@ mhz=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{print $2}'` -if [ $mhz -ge 1000 ]; then - speed=$(echo $mhz | awk '{ printf "%.1f", $1 / 1000 }') - unit="GHz" -else - speed="$mhz" - unit="MHz" -fi +speed=$(echo $mhz | awk '{ printf "%.1f", $1 / 1000 }') +unit="GHz" + printf "\005{= cW}%s$unit\005{-} " $speed diff --git a/debian/changelog b/debian/changelog index 84140776..f2f8193c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ screen-profiles (1.45) unreleased; urgency=low [ Dustin Kirkland ] - * bin/cpu-freq: fix for powerpc, fix for arm + * bin/cpu-freq: fix for powerpc, fix for arm, always report in GHz * bin/uptime: don't print seconds, since we don't update often enough * screen-profiles-status: use home bin scripts, if available first, then fallback to system-wide, allows for local overrides; comment @@ -12,7 +12,7 @@ screen-profiles (1.45) unreleased; urgency=low [ Jon Bernard ] * debian/control: fix typo in screen-profiles-extras description - -- Dustin Kirkland Thu, 16 Apr 2009 12:51:38 -0500 + -- Dustin Kirkland Thu, 16 Apr 2009 12:55:35 -0500 screen-profiles (1.44-0ubuntu1) jaunty; urgency=low