mirror of
https://github.com/Relintai/godot-mono-builds.git
synced 2024-11-08 10:12:09 +01:00
Wait and check for exit code when running 'patch'
This commit is contained in:
parent
443ca3c7e1
commit
27b5523a2d
@ -28,8 +28,14 @@ def main(raw_args):
|
|||||||
]
|
]
|
||||||
|
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
from sys import exit
|
||||||
for patch in patches:
|
for patch in patches:
|
||||||
proc = Popen('bash -c \'patch -N -p1 < %s; exit 0\'' % patch, cwd=emsdk_root, shell=True)
|
patch_cmd = 'patch -N -p1 < %s' % patch
|
||||||
|
print('Running: %s' % patch_cmd)
|
||||||
|
proc = Popen('bash -c \'%s; exit $?\'' % patch_cmd, cwd=emsdk_root, shell=True)
|
||||||
|
exit_code = proc.wait()
|
||||||
|
if exit_code != 0:
|
||||||
|
exit('patch exited with error code: %s' % exit_code)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -33,8 +33,14 @@ def main(raw_args):
|
|||||||
]
|
]
|
||||||
|
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
from sys import exit
|
||||||
for patch in patches:
|
for patch in patches:
|
||||||
proc = Popen('bash -c \'patch -N -p1 < %s; exit 0\'' % os.path.join(patches_dir, patch), cwd=mono_source_root, shell=True)
|
patch_cmd = 'patch -N -p1 < %s' % os.path.join(patches_dir, patch)
|
||||||
|
print('Running: %s' % patch_cmd)
|
||||||
|
proc = Popen('bash -c \'%s; exit $?\'' % patch_cmd, cwd=mono_source_root, shell=True)
|
||||||
|
exit_code = proc.wait()
|
||||||
|
if exit_code != 0:
|
||||||
|
exit('patch exited with error code: %s' % exit_code)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user