Salome HOME
Prepare SALOME 2.2.6 installation
[tools/install.git] / runInstall
index 82cd745f4acd232ec802e2dacdb76ccf1e66badd..d3d2725a73206617ef4bc7cddfa7d693f88e475f 100755 (executable)
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
 
+import warnings
+warnings.filterwarnings("ignore", "", DeprecationWarning)
+
 import xmllib
 import sys, os, string, re
 
@@ -484,7 +487,7 @@ if __name__ == "__main__":
     # define xml file -----------------
     if (xml_file is None) :
         xml_file_name = "config.xml"
-        if os.path.exists("/proc/version"):
+        if os.path.exists("/etc/redhat-release"):
             data = open("/etc/redhat-release").readline()
             res = re.search(r'Red\s+Hat\s+Linux\s+release\s+([\d.]*)', data)
             if res is not None:
@@ -492,8 +495,15 @@ if __name__ == "__main__":
                 filename = "config_RedHat" + num+ ".xml"
                 if (os.path.exists(cur_dir + filename)):
                     xml_file_name = filename
-                
+            else:
+                res = re.search(r'Mandrakelinux\s+release\s+([\d.]*)', data)
+                if res is not None:
+                    num = re.sub("[.]", "_", (res.groups())[0])
+                    filename = "config_Mandrake" + num+ ".xml"
+                    if (os.path.exists(cur_dir + filename)):
+                        xml_file_name = filename
         xml_file = cur_dir +  xml_file_name
+
     if xml_file is None or not os.path.exists(xml_file):
         error_exit("No xml file is found, try to run with options -f <xmlfile>")