iankelling.org
/
git
/
distro-functions
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better distro version numbers
[distro-functions]
/
src
/
identify-distros
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() {
}
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() {
}
debian-archive() {