Adding several dependency checks for far installation. Redoing the XML output.
[people/mcb30/edk2.git] / edk2 / Tools / Python / WorkspaceRoutines.py
index 3634d25..f1f8be2 100755 (executable)
@@ -33,3 +33,28 @@ def lean(path):
   """Lean the slashes forward"""
 
   return os.path.normpath(path).replace("\\", "/")
+
+def mkdir(path):
+  """Make a directory if it is not there already."""
+
+  try:
+    os.makedirs(path)
+  except:
+    pass
+
+def Md5(filename):
+
+  sum = ""
+
+  try:
+    f=open(filename, "rb")
+    sum = md5.md5(f.read()).hexdigest()
+    f.close()
+  except IOError:
+    print "Error: Unable to open file: %s" % filename
+    sys.exit()
+
+  return sum
+
+
+