* bin/cpu-freq, byobu-export, select-screen-profile: fix bashisms

on the read command, Debian Bug (closes: #530989)


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-15 21:23:22 -05:00
commit 9fb67be32e
4 changed files with 18 additions and 7 deletions

View file

@ -22,6 +22,10 @@ if [ "$1" = "--detail" ]; then
exit 0
fi
if [ -r "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" ]; then
speed=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{ printf "%.1f", $1 / 1000000 }'`
else
speed=`egrep -i -m 1 "^cpu MHz|^clock|^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ printf "%.1f", $2 / 1000 }'`
fi
[ -n "$speed" ] && printf "\005{= cW}%sGHz\005{-} " $speed

View file

@ -65,9 +65,11 @@ choose() {
fi
count=`expr $count + 1`
if ! test $selected -gt 0 2>/dev/null; then
read -p "`gettext 'Choose'` [1 -$i]: " -r selected
echo -n "`gettext 'Choose'` [1 -$i]: "
selected=`head -n1`
elif ! test $selected -le $i 2>/dev/null; then
read -p "`gettext 'Choose'` [1 -$i]: " -r selected
echo -n "`gettext 'Choose'` [1 -$i]: "
selected=`head -n1`
else
break
fi
@ -183,7 +185,8 @@ else
echo "$file" | grep -qs "\.tar\.gz$" || error "Target file must be a '.tar.gz' archive"
if [ -e "$file" ]; then
echo `gettext "File exists"` " [$file]"
read -p "`gettext 'Remove file? [y/N] '`" -r remove
echo -n "`gettext 'Remove file? [y/N] '`"
remove=`head -n1`
if [ "$remove" = "Y" -o "$remove" = "y" ]; then
rm -f "$file"
else

4
debian/changelog vendored
View file

@ -8,11 +8,13 @@ byobu (2.11) unreleased; urgency=low
.hushlogin to prevent double-printing of motd
* bin/network-*, byobu.1: allow monitored network interface overrides in
~/.byobu/network-interface, update manpage accordingly, LP: #386364
* bin/cpu-freq, byobu-export, select-screen-profile: fix bashisms
on the read command, Debian Bug (closes: #530989)
[ Ciemon Dunville ]
* byobu.1: Simply added a SEE ALSO to byobu.1
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 12 Jun 2009 12:36:51 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 15 Jun 2009 21:21:42 -0500
byobu (2.10-0ubuntu1) karmic; urgency=low

View file

@ -101,9 +101,11 @@ prompt() {
if [ -z "$selected" -a ! -z "$simple" ]; then
selected="$simple"
elif ! test $selected -gt 0 2>/dev/null; then
read -p "`gettext 'Choose'` 1-$i [$simple]: " -r selected
echo -n "`gettext 'Choose'` 1-$i [$simple]: "
selected=`head -n1`
elif ! test $selected -le $i 2>/dev/null; then
read -p "`gettext 'Choose'` 1-$i [$simple]: " -r selected
echo -n "`gettext 'Choose'` 1-$i [$simple]: "
selected=`head -n1`
else
break
fi