From ed512c188a79f67fb69a6befadbe0043c435747b Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 10 Nov 2020 15:01:22 -0500 Subject: [PATCH] better distro version numbers --- src/identify-distros | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/identify-distros b/src/identify-distros index a62889e..9c2221f 100644 --- a/src/identify-distros +++ b/src/identify-distros @@ -45,8 +45,15 @@ distro-name-ver() { } distro-num() { - # subshell keeps environment clean - ( . /etc/os-release; echo ${VERSION_ID%%.*}; ) + # Subshell keeps environment clean. + ( . /etc/os-release + # in ubuntu the .x matters, trisquel it doesnt + if [[ $ID == ubuntu ]]; then + echo $VERSION_ID + else + echo ${VERSION_ID%%.*} + fi + ) } debian-archive() { -- 2.30.2