Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correctly split os/ver on redhat-like.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 16 May 2019 13:58:53 +0000 (15:58 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 16 May 2019 14:03:44 +0000 (16:03 +0200)
tools/jenkins/build.sh

index 0e66fd6..72a3f57 100755 (executable)
@@ -72,8 +72,7 @@ elif [ -f /etc/debian_version ]; then
     os=Debian
     ver=$(cat /etc/debian_version)
 elif [ -f /etc/redhat-release ]; then
     os=Debian
     ver=$(cat /etc/debian_version)
 elif [ -f /etc/redhat-release ]; then
-    os=""
-    ver=$(cat /etc/redhat-release)
+    read -r os ver < /etc/redhat-release
 elif [ -f /usr/bin/sw_vers ]; then
     os=$(sw_vers -productName)
     ver=$(sw_vers -productVersion)
 elif [ -f /usr/bin/sw_vers ]; then
     os=$(sw_vers -productName)
     ver=$(sw_vers -productVersion)