* debian/control, bin/*: remove dependencing on bc by using awk

This commit is contained in:
Dustin Kirkland 2009-01-22 00:31:50 -05:00
commit e915f15be4
4 changed files with 10 additions and 12 deletions

View file

@ -1,8 +1,8 @@
#!/bin/sh -e
mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | sed "s/^.*: //" | sed "s/\..*$//"`
if [ $mhz -gt 1000 -a -x /usr/bin/bc ]; then
ghz=$(echo "scale=1; $mhz/1000" | bc)
if [ $mhz -ge 1000 ]; then
ghz=$(echo "$mhz" | awk '{ printf "%.1f", $1 / 1000 }')
echo "$ghz""GHz"
else
echo "$mhz""MHz"

View file

@ -1,11 +1,11 @@
#!/bin/sh -e
mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'`
if [ $mem -gt 1000000 -a -x /usr/bin/bc ]; then
mem=$(echo "scale=1; $mem/1000000" | bc)
if [ $mem -ge 1048576 ]; then
mem=$(echo "$mem" | awk '{ printf "%.1f", $1 / 1048576 }')
echo "$mem""GB"
elif [ $mem -gt 1000 -a -x /usr/bin/bc ]; then
mem=$(echo "scale=0; $mem/1000" | bc)
elif [ $mem -ge 1024 ]; then
mem=$(echo "$mem" | awk '{ printf "%.0f", $1 / 1024 }')
echo "$mem""MB"
else
echo "$mem""KB"

3
debian/changelog vendored
View file

@ -5,8 +5,9 @@ screen-profiles (1.13) UNRELEASED; urgency=low
information
* doc/help.txt: updated help page
* keybindings/common: F12 -> lockscreen
* debian/control, bin/*: remove dependencing on bc by using awk
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 22 Jan 2009 00:30:14 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 22 Jan 2009 00:31:23 -0500
screen-profiles (1.12-0ubuntu1) jaunty; urgency=low

7
debian/control vendored
View file

@ -11,7 +11,6 @@ Package: screen-profiles
Architecture: all
Depends: ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt
Recommends: update-notifier-common
Suggests: bc
Enhances: screen
Description: a set of useful profiles and a profile-switcher for GNU screen
screen-profiles includes a set of profiles for the GNU screen window manager.
@ -22,7 +21,5 @@ Description: a set of useful profiles and a profile-switcher for GNU screen
updates-available), etc. The profile-switcher allows users to quickly switch
their .screenrc to any of the available profiles.
.
bc provides more advanced calculations of memory and cpu-speed in the
status panel. update-notifier-common provides a more efficient and standard
mechanism for calculating the number of updates available in the status
panel.
update-notifier-common provides a more efficient and standard mechanism for
calculating the number of updates available in the status panel.