* experimental/byobu-classroom, usr/bin/byobu-ctrl-a, usr/bin/byobu-

enable, usr/bin/byobu-select-backend, usr/bin/byobu-select-profile,
  usr/bin/byobu-ulevel, usr/lib/byobu/custom, usr/lib/byobu/disk,
  usr/share/byobu/tests/byobu-time-notifications: LP: #882814
  - use printf instead of "echo -n" for portability to Mac OSX
This commit is contained in:
Dustin Kirkland 2011-11-09 17:38:24 -06:00
commit 1d635701be
10 changed files with 18 additions and 13 deletions

5
debian/changelog vendored
View file

@ -74,6 +74,11 @@ byobu (4.47) unreleased; urgency=low
usr/share/doc/byobu/help.txt => usr/share/doc/byobu/help.screen.txt, usr/share/doc/byobu/help.txt => usr/share/doc/byobu/help.screen.txt,
usr/share/doc/byobu/Makefile.am: usr/share/doc/byobu/Makefile.am:
- show tmux help in tmux, screen help in screen - show tmux help in tmux, screen help in screen
* experimental/byobu-classroom, usr/bin/byobu-ctrl-a, usr/bin/byobu-
enable, usr/bin/byobu-select-backend, usr/bin/byobu-select-profile,
usr/bin/byobu-ulevel, usr/lib/byobu/custom, usr/lib/byobu/disk,
usr/share/byobu/tests/byobu-time-notifications: LP: #882814
- use printf instead of "echo -n" for portability to Mac OSX
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 08 Nov 2011 19:16:15 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 08 Nov 2011 19:16:15 -0600

View file

@ -93,7 +93,7 @@ while [ $(stat -c%a "$screen") != "6755" ]; do
echo echo
ls -alF "$screen" ls -alF "$screen"
info "To operate in classroom mode, $screen must have 6755 permissions." info "To operate in classroom mode, $screen must have 6755 permissions."
echo -n "Do you want to set this now? [y/N]: " printf "Do you want to set this now? [y/N]: "
c=$(head -n1) c=$(head -n1)
case "$c" in case "$c" in
y|Y) y|Y)
@ -121,7 +121,7 @@ while [ $(grep -c "#byobu-classrom" /etc/ssh/sshd_config) != "4" ]; do
info " b) disable TCP Forwarding" info " b) disable TCP Forwarding"
info " c) force the guest user's login command" info " c) force the guest user's login command"
echo echo
echo -n "Do you want to set these now? [y/N]: " printf "Do you want to set these now? [y/N]: "
c=$(head -n1) c=$(head -n1)
case "$c" in case "$c" in
y|Y) y|Y)

View file

@ -54,7 +54,7 @@ while [ -z "$bind_to" ]; do
echo " - You can press F9 and choose your escape character" echo " - You can press F9 and choose your escape character"
echo " - You can run 'byobu-ctrl-a' at any time to change your selection" echo " - You can run 'byobu-ctrl-a' at any time to change your selection"
echo echo
echo -n "Select [1 or 2]: " printf "Select [1 or 2]: "
s=$(head -n1) s=$(head -n1)
echo echo
case "$s" in case "$s" in

View file

@ -29,7 +29,7 @@ echo
echo "To disable this behavior later, just run:" echo "To disable this behavior later, just run:"
echo " byobu-disable" echo " byobu-disable"
echo echo
echo -n "Press <enter> to continue..." printf "Press <enter> to continue..."
$(head -n1) $(head -n1)
exec byobu exec byobu

View file

@ -38,7 +38,7 @@ prompt() {
echo " 1. screen" echo " 1. screen"
echo " 2. tmux" echo " 2. tmux"
echo echo
echo -n "Choose 1-2 [2]: " printf "Choose 1-2 [2]: "
choice=$(head -n1) choice=$(head -n1)
case $choice in case $choice in
1) _RET="screen" ;; 1) _RET="screen" ;;

View file

@ -94,7 +94,7 @@ prompt() {
fi fi
i=1 i=1
for x in $COLORS; do for x in $COLORS; do
test $i -lt 10 2>/dev/null && echo -n " " || echo -n " " test $i -lt 10 2>/dev/null && printf " " || printf " "
echo "$i. $x" echo "$i. $x"
i=$(expr $i + 1) i=$(expr $i + 1)
[ "$simple" = "$x" ] && simple=$i [ "$simple" = "$x" ] && simple=$i
@ -103,10 +103,10 @@ prompt() {
if [ -z "$selected" -a -n "$simple" ]; then if [ -z "$selected" -a -n "$simple" ]; then
selected="$simple" selected="$simple"
elif ! test $selected -gt 0 2>/dev/null; then elif ! test $selected -gt 0 2>/dev/null; then
echo -n "`gettext 'Choose'` 1-$i [$simple]: " printf "`gettext 'Choose'` 1-$i [$simple]: "
selected=`head -n1` selected=`head -n1`
elif ! test $selected -le $i 2>/dev/null; then elif ! test $selected -le $i 2>/dev/null; then
echo -n "`gettext 'Choose'` 1-$i [$simple]: " printf "`gettext 'Choose'` 1-$i [$simple]: "
selected=`head -n1` selected=`head -n1`
else else
i=1 i=1

View file

@ -371,7 +371,7 @@ list_theme()
echo echo
for c in $content for c in $content
do do
echo -n "$c " printf "$c "
done done
echo -e "\n" echo -e "\n"
} }

View file

@ -53,7 +53,7 @@ __custom() {
;; ;;
esac esac
done done
echo -n "$output" | $SED ':a;N;$!ba;s/\n//g' printf "$output" | $SED ':a;N;$!ba;s/\n//g'
} }
# vi: syntax=sh ts=4 noexpandtab # vi: syntax=sh ts=4 noexpandtab

View file

@ -45,8 +45,8 @@ __disk() {
t*|T*) unit="$ICON_TB" ;; t*|T*) unit="$ICON_TB" ;;
esac esac
_UNIT=${unit}; _SIZE=${size}; _PCT=${pct}; _UNIT=${unit}; _SIZE=${size}; _PCT=${pct};
color b M W; echo -n "$_SIZE"; color -; color M W; echo -n "${_UNIT}"; color -; color b M W; printf "$_SIZE"; color -; color M W; printf "${_UNIT}"; color -;
color b M W; echo -n "$_PCT"; color -; color M W; echo -n "$PCT" ; color --; color b M W; printf "$_PCT"; color -; color M W; printf "$PCT" ; color --;
} }
# vi: syntax=sh ts=4 noexpandtab # vi: syntax=sh ts=4 noexpandtab

View file

@ -43,6 +43,6 @@ for i in $list; do
;; ;;
esac esac
freq=`grep "byobu-status $i$" /usr/share/$PKG/profiles/common | awk '{print $3}'` freq=`grep "byobu-status $i$" /usr/share/$PKG/profiles/common | awk '{print $3}'`
echo -n "$i $freq " printf "%s" "$i $freq "
time loop $i time loop $i
done done