[explorer/os_version] Convert Devuan ceres to version number
Conversion of Devuan ceres to version numbers is done based on Devuan codenames. The version number is the version number of the final release - 0.01. Analogous to Debian.
This commit is contained in:
parent
77dab4c5c6
commit
24c9406ea0
1 changed files with 21 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
#
|
#
|
||||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
|
||||||
|
# 2020-2021 Dennis Camera (dennis.camera at ssrq-sds-fds.ch)
|
||||||
#
|
#
|
||||||
# This file is part of cdist.
|
# This file is part of cdist.
|
||||||
#
|
#
|
||||||
|
@ -17,12 +18,11 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# All os variables are lower case
|
# All os variables are lower case
|
||||||
#
|
#
|
||||||
#
|
|
||||||
|
|
||||||
case "$("$__explorer/os")" in
|
case $("${__explorer:?}/os")
|
||||||
|
in
|
||||||
amazon)
|
amazon)
|
||||||
cat /etc/system-release
|
cat /etc/system-release
|
||||||
;;
|
;;
|
||||||
|
@ -59,7 +59,23 @@ case "$("$__explorer/os")" in
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
devuan)
|
devuan)
|
||||||
cat /etc/devuan_version
|
devuan_version=$(cat /etc/devuan_version)
|
||||||
|
case ${devuan_version}
|
||||||
|
in
|
||||||
|
(*/ceres)
|
||||||
|
# ceres versions don't have a number, so we decode by codename:
|
||||||
|
case ${devuan_version}
|
||||||
|
in
|
||||||
|
(chimaera/ceres) echo 3.99 ;;
|
||||||
|
(beowulf/ceres) echo 2.99 ;;
|
||||||
|
(ascii/ceres) echo 1.99 ;;
|
||||||
|
(*) exit 1
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
echo "${devuan_version}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
cat /etc/fedora-release
|
cat /etc/fedora-release
|
||||||
|
|
Loading…
Reference in a new issue