From 6510108ec12c70cd3d185aff7fa24d876c4e03be Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 31 Oct 2012 09:49:28 +0100 Subject: [PATCH] * usr/lib/byobu/release: LP: #1068581 - simplify and use lsb_release -s -r when necessary --- debian/changelog | 2 ++ usr/lib/byobu/release | 15 +-------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index d9595e3b..ffa94ad5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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- diff --git a/usr/lib/byobu/release b/usr/lib/byobu/release index 46b31fe7..70a8de87 100755 --- a/usr/lib/byobu/release +++ b/usr/lib/byobu/release @@ -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 --