]> Creatis software - creaToolsTools.git/blobdiff - Linux/scripts/LocalFunctions.sh
#3044 creaToolsTools Bug New Normal - Fedora 24 ThirdParty library conflict with...
[creaToolsTools.git] / Linux / scripts / LocalFunctions.sh
index 9075cf2673dcec9539944b273c2ac46630bfa0c6..90624a24f2901c36625ebf4fe142fc741f9113bf 100644 (file)
@@ -62,8 +62,10 @@ 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=$(lsb_release -i | awk '{print $3}')
+       elif [ "$OS" == Linux  ] ; then OS=`awk 'NR==1{print $1}' /etc/system-release`
     else OS=""
     fi
 # checkDistrib $OS
@@ -75,7 +77,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
@@ -87,7 +89,7 @@ function getDownloadCommand {
     local DISTRIB=`getDistrib`
 
       if [ "$DISTRIB" == MacOS ] ; then downloadCommand=curl;
-    elif [ "$DISTRIB" == Fedora  ] ; then downloadCommand=aria -x 16
+    elif [ "$DISTRIB" == Fedora  ] ; then downloadCommand='aria2c -x 16'
     elif [ "$DISTRIB" == Ubuntu  ] ; then downloadCommand=wget
     else downloadCommand="VOID_EED"
     fi