diff --git a/bin/release b/bin/release index cedb993d..de47ccff 100755 --- a/bin/release +++ b/bin/release @@ -22,8 +22,17 @@ p="release" grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0 if which lsb_release >/dev/null; then - echo $(lsb_release -s -i) $(lsb_release -s -r) + # If lsb_release is available, use it + if lsb_release -s -d | grep -qs "^Ubuntu .*\..*\..*$"; then + # Use the -d if an Ubuntu LTS + lsb_release -s -d + else + # But for other distros the description + # is too long, so build from -i and -r + echo $(lsb_release -s -i) $(lsb_release -s -r) + fi elif [ -r "/etc/issue" ]; then + # Otherwise, grab part of /etc/issue head -n1 /etc/issue | awk '{print $1}' else echo "Unknown" diff --git a/debian/changelog b/debian/changelog index 47beed00..82278e8b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,7 @@ screen-profiles (1.41) unreleased; urgency=low get-orig-source * bin/release: determine release from /etc/issue if lsb-release not found; don't use fully qualified path for lsb_release as it seems this has moved - around (see Dapper) + around (see Dapper); for Ubuntu use -d, but use -r -i for other os's * licenses updated to GPLv3 (dropped "or later" clause) * screen-profiles-export: new script, for exporting a profile to systems where screen-profiles are not installed @@ -19,7 +19,7 @@ screen-profiles (1.41) unreleased; urgency=low [ James Wilcox ] * bin/updates-available: support SUSE's zypper - -- Dustin Kirkland Sat, 28 Mar 2009 12:05:56 -0500 + -- Dustin Kirkland Sat, 28 Mar 2009 12:23:27 -0500 screen-profiles (1.40-0ubuntu1) jaunty; urgency=low