* usr/lib/byobu/release: LP: #1068581

- simplify and use lsb_release -s -r when necessary
This commit is contained in:
Dustin Kirkland 2012-10-31 09:49:28 +01:00
commit 6510108ec1
2 changed files with 3 additions and 14 deletions

2
debian/changelog vendored
View file

@ -19,6 +19,8 @@ byobu (5.22) unreleased; urgency=low
byobu-janitor runs
- move metadata_available flag to more ephemeral run dir
- drop timeout on metadata check to 5 seconds
* usr/lib/byobu/release: LP: #1068581
- simplify and use lsb_release -s -r when necessary
[ Jake Biesinger and Dustin Kirkland ]
* usr/share/byobu/keybindings/common, usr/share/byobu/keybindings/f-

View file

@ -46,20 +46,7 @@ __release() {
fi
if [ -z "$RELEASE" ] && $BYOBU_TEST lsb_release >/dev/null 2>&1; then
# If lsb_release is available, use it
local r=$(lsb_release -s -d)
case "$r" in
Ubuntu*)
# Use the -d if an Ubuntu LTS
RELEASE="$r"
;;
*)
# But for other distros the description
# is too long, so build from -i and -r
local i=$(lsb_release -s -i)
r=$(lsb_release -s -r)
RELEASE="$i $r"
;;
esac
RELEASE=$(lsb_release -s -r)
fi
if [ -n "$RELEASE_ABBREVIATED" ] && [ $RELEASE_ABBREVIATED -gt 0 ]; then
color bold2; printf "%.${RELEASE_ABBREVIATED}s" "$RELEASE"; color --