]> https://gitweb.dealii.org/ - candi.git/commitdiff
simplified recongnition of fedora and ubuntu major version number in guess_plattform()
authorUwe Köcher <koecher@hsu-hamburg.de>
Tue, 25 Jul 2017 17:57:46 +0000 (19:57 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Tue, 25 Jul 2017 17:57:46 +0000 (19:57 +0200)
candi.sh

index 4240007ef7e73d48a9ad6ec7da8053f43f8b0735..5828655afb4567d8acd4d2aa8e85a6fc52d6c5cd 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -562,17 +562,7 @@ guess_platform() {
         echo cray
     
     elif [ -f /etc/fedora-release ]; then
-        local FEDORANAME=`gawk '{if (match($0,/\((.*)\)/,f)) print f[1]}' /etc/fedora-release`
-        case ${FEDORANAME} in
-            "Schrödinger’s Cat"*) echo fedora19;;
-            "Heisenbug"*)         echo fedora20;;
-            "Twenty One"*)        echo fedora21;;
-            "Twenty Two"*)        echo fedora22;;
-            "Twenty Three"*)      echo fedora23;;
-            "Twenty Four"*)       echo fedora24;;
-            "Twenty Five"*)       echo fedora25;;
-            "Twenty Six"*)        echo fedora26;;
-        esac
+        echo fedora`lsb_release -r -s`
     
     elif [ -f /etc/redhat-release ]; then
         local RHELNAME=`gawk '{if (match($0,/\((.*)\)/,f)) print f[1]}' /etc/redhat-release`
@@ -587,11 +577,7 @@ guess_platform() {
         local DESCRIPTION=$(lsb_release -d -s)
         case ${DISTRO}:${CODENAME}:${DESCRIPTION} in
             *:*:*Debian*9*)       echo debian9;;
-            *:*:*Ubuntu*\ 12*)    echo ubuntu12;;
-            *:*:*Ubuntu*\ 14*)    echo ubuntu14;;
-            *:*:*Ubuntu*\ 15*)    echo ubuntu15;;
-            *:xenial*:*Ubuntu*)   echo ubuntu16;;
-            *:zesty*:*Ubuntu*)    echo ubuntu17;;
+            *:*:*Ubuntu*)         echo ubuntu`lsb_release -r -s`;;
             *:*:*openSUSE\ 12*)   echo opensuse12;;
             *:*:*openSUSE\ 13*)   echo opensuse13;;
         esac

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.