| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 """Platform-specific utility methods shared by several scripts.""" | 4 """Platform-specific utility methods shared by several scripts.""" |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 "C:\b\slave\webkit-release-kjs\build\third_party\cygwin\bin" are converted to | 185 "C:\b\slave\webkit-release-kjs\build\third_party\cygwin\bin" are converted to |
| 186 plain "/usr/bin". To avoid this, we do the conversion manually. | 186 plain "/usr/bin". To avoid this, we do the conversion manually. |
| 187 | 187 |
| 188 The path is expected to be an absolute path, on any drive. | 188 The path is expected to be an absolute path, on any drive. |
| 189 """ | 189 """ |
| 190 drive_regexp = re.compile(r'([a-z]):[/\\]', re.IGNORECASE) | 190 drive_regexp = re.compile(r'([a-z]):[/\\]', re.IGNORECASE) |
| 191 def LowerDrive(matchobj): | 191 def LowerDrive(matchobj): |
| 192 return '/cygdrive/%s/' % matchobj.group(1).lower() | 192 return '/cygdrive/%s/' % matchobj.group(1).lower() |
| 193 path = drive_regexp.sub(LowerDrive, path) | 193 path = drive_regexp.sub(LowerDrive, path) |
| 194 return path.replace('\\', '/') | 194 return path.replace('\\', '/') |
| 195 | |
| OLD | NEW |