| 492 | |
| 493 | |
| 494 | def unix2win(matchobj): |
| 495 | if matchobj.group(1) is not None: return cygwinWindowsRoot + matchobj.group() |
| 496 | if matchobj.group(2) is not None: return '"%s%s' % (cygwinWindowsRoot, matchobj.group().lstrip('"')) |
| 497 | if matchobj.group(3) is not None: return "'%s%s" % (cygwinWindowsRoot, matchobj.group().lstrip("'")) |
| 498 | return matchobj.group() |
| 499 | |
| 500 | |
| 501 | def cygwinifyPaths(command): |
| 502 | # The problem: Native Windows applications running under Cygwin can't |
| 503 | # handle Cygwin's Unix-style paths. However, environment variable |
| 504 | # values are automatically converted, so only paths outside of |
| 505 | # environment variable values should be converted to Windows paths. |
| 506 | # Assumption: all paths will be absolute. |
| 507 | if '; gradlew ' in command: command = reUnixPath.sub(unix2win, command) |
| 508 | return command |
| 509 | |
| 510 | |
| 511 | def printFileContents(fileName): |
| 512 | |