From: Ian Kelling Date: Tue, 10 Nov 2020 20:01:22 +0000 (-0500) Subject: better distro version numbers X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=ed512c188a79f67fb69a6befadbe0043c435747b;p=distro-functions better distro version numbers --- 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() {