* usr/lib/byobu/include/common:

- simplify backend detection
This commit is contained in:
Dustin Kirkland 2013-11-08 12:27:25 -06:00
commit cf84385079
2 changed files with 7 additions and 6 deletions

2
debian/changelog vendored
View file

@ -7,6 +7,8 @@ byobu (5.64) unreleased; urgency=low
* etc/byobu/backend, usr/lib/byobu/include/common:
- really default to tmux, at this point
- tmux was the default in the previous LTS
* usr/lib/byobu/include/common:
- simplify backend detection
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 07 Nov 2013 11:55:15 -0600

View file

@ -34,12 +34,11 @@ if [ -z "${BYOBU_INCLUDED_LIBS}" ]; then
# Just in case there's no config file at all
if [ -z "${BYOBU_BACKEND}" ]; then
# New byobu configuration, default to tmux
for i in tmux screen; do
$BYOBU_TEST $i >/dev/null && BYOBU_BACKEND="$i" && break
done
unset i
fi
if ! $BYOBU_TEST "$BYOBU_BACKEND" >/dev/null; then
if $BYOBU_TEST tmux >/dev/null; then
BYOBU_BACKEND="tmux"
elif $BYOBU_TEST screen >/dev/null; then
BYOBU_BACKEND="screen"
else
printf "%s\n" "ERROR: $PKG won't work without tmux or screen installed" 1>&2
fi
fi