|
23 | 23 | print("Operating system not recognized correctly")
|
24 | 24 | sys.exit(1)
|
25 | 25 |
|
| 26 | +SHELLTYPE = os.environ.get('SHELL') |
| 27 | +# SHELL only set for Cygwin or Linux, use "shell=False" in Popen calls |
| 28 | +SHELLARG = False |
| 29 | +if ( SHELLTYPE == None ): |
| 30 | + # on Windows, set "shell=True" |
| 31 | + SHELLARG = True |
| 32 | + |
26 | 33 | # GPUPerfAPI git project to folder map definitions
|
27 | 34 | # - GitHubMapping
|
28 | 35 | from UpdateCommonMap import *
|
|
44 | 51 | targetPath = os.path.normpath(tmppath)
|
45 | 52 | if os.path.isdir(targetPath):
|
46 | 53 | print("\nDirectory " + targetPath + " exists, using 'git pull' to get latest")
|
47 |
| - p = subprocess.Popen(["git","pull"], cwd=targetPath) |
| 54 | + p = subprocess.Popen(["git","pull"], cwd=targetPath, shell=SHELLARG) |
48 | 55 | p.wait();
|
49 | 56 | else:
|
50 | 57 | print("\nDirectory " + targetPath + " does not exist, using 'git clone' to get latest")
|
51 | 58 | gitamdRoot = "https://github.com/GPUOpen-Tools/" + key
|
52 | 59 | commandArgs = ["git", "clone", gitamdRoot, targetPath]
|
53 |
| - p = subprocess.Popen( commandArgs ) |
| 60 | + p = subprocess.Popen(commandArgs, shell=SHELLARG) |
54 | 61 | p.wait()
|
55 |
| - p = subprocess.Popen(["git","reset","--hard",GitHubMapping[key][1]], cwd=targetPath) |
| 62 | + p = subprocess.Popen(["git","reset","--hard",GitHubMapping[key][1]], cwd=targetPath, shell=SHELLARG) |
56 | 63 | p.wait()
|
57 | 64 |
|
58 | 65 | # Downloads and runs an installer for a Common Dir (just used for VulkanSDK currently)
|
|
0 commit comments