X-Git-Url: https://iankelling.org/git/?p=distro-functions;a=blobdiff_plain;f=src%2Fidentify-distros;fp=src%2Fidentify-distros;h=9c2221f43b7826137f1bbe3206984321fa3356eb;hp=a62889ee4541f08d5c569cafc105ba3abf8520e2;hb=ed512c188a79f67fb69a6befadbe0043c435747b;hpb=1550d2b551dd02700d4e3e1317d34f2fa25a2192 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() {