iankelling.org
/
git
/
distro-functions
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1550d2b
)
better distro version numbers
author
Ian Kelling
<iank@fsf.org>
Tue, 10 Nov 2020 20:01:22 +0000
(15:01 -0500)
committer
Ian Kelling
<iank@fsf.org>
Tue, 10 Nov 2020 20:01:22 +0000
(15:01 -0500)
src/identify-distros
patch
|
blob
|
history
diff --git
a/src/identify-distros
b/src/identify-distros
index a62889ee4541f08d5c569cafc105ba3abf8520e2..9c2221f43b7826137f1bbe3206984321fa3356eb 100644
(file)
--- 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() {