X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Tools%2FPython%2FWorkspaceRoutines.py;h=3634d256617d0ec8aed7c205cca39fe136f5a161;hb=243009a7bf0cbd4a40815343d132481031f128c2;hp=c919065fc3d3bfa52b7d0c0ac7e6b82f1c306c36;hpb=e853a9d4831ae95363ce5fdcce71cbb23aff2269;p=mirror_edk2.git diff --git a/Tools/Python/WorkspaceRoutines.py b/Tools/Python/WorkspaceRoutines.py index c919065fc3..3634d25661 100755 --- a/Tools/Python/WorkspaceRoutines.py +++ b/Tools/Python/WorkspaceRoutines.py @@ -1,5 +1,14 @@ #!/usr/bin/env python +# Copyright (c) 2007, Intel Corporation +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + import os, sys, re, getopt, string, glob, xml.dom.minidom, pprint, md5, socket, getpass, time, random def inWorkspace(rel_path=""): @@ -19,3 +28,8 @@ def genguid(): str(time.time()) + socket.gethostbyname(socket.gethostname())).hexdigest() return "%s-%s-%s-%s-%s" % (g[0:8], g[8:12], g[12:16], g[16:20], g[20:]) + +def lean(path): + """Lean the slashes forward""" + + return os.path.normpath(path).replace("\\", "/")