X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FLocalFunctions.sh;h=9bf488d08b4d5aab2c68680d66a12ed029a5197f;hb=8ad1ad65387e74837238ff222bbf6bdd1f2f07b7;hp=493ce661f20b5418b40beae930de4815f2609df5;hpb=e79d72630bd419d3223605aecbc3ca44360a30f6;p=creaToolsTools.git diff --git a/Linux/scripts/LocalFunctions.sh b/Linux/scripts/LocalFunctions.sh index 493ce66..9bf488d 100644 --- a/Linux/scripts/LocalFunctions.sh +++ b/Linux/scripts/LocalFunctions.sh @@ -62,8 +62,12 @@ function checkDistrib { function getDistrib { local OS=`uname` - if [ "$OS" == Darwin ] ; then OS=MacOS; - elif [ "$OS" == Linux ] ; then OS=`awk 'NR==1{print $1}' /etc/issue` + if [ "$OS" == Darwin ] ; then OS=MacOS; + +##EED2016-10-15 +## elif [ "$OS" == Linux ] ; then OS=`awk 'NR==1{print $1}' /etc/system-release` + elif [ "$OS" == Linux ] ; then OS=$(lsb_release -i | awk '{print $3}') + else OS="" fi # checkDistrib $OS @@ -75,7 +79,7 @@ function getDistribVersion { local DISTRIB=`getDistrib` if [ "$DISTRIB" == MacOS ] ; then OSVesion=VOID_Darwin_EED; - elif [ "$DISTRIB" == Fedora ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/issue` + elif [ "$DISTRIB" == Fedora ] ; then OSVersion=`awk 'NR==1{print $3}' /etc/system-release` elif [ "$DISTRIB" == Ubuntu ] ; then OSVersion=`awk 'NR==1{print $2}' /etc/issue` else OSVersion="VOID_EED" fi