cue: fix regex matching for patch and archive HOOKs

This commit is contained in:
Ralph Lange
2020-07-30 14:14:20 +02:00
parent 87942a7c29
commit eb5edd3055

4
cue.py
View File

@@ -539,9 +539,9 @@ def add_dependency(dep):
hook = setup[dep + '_HOOK']
hook_file = os.path.join(curdir, hook)
if os.path.exists(hook_file):
if re.match(r'.+\\.patch$', hook):
if re.match(r'.+\.patch$', hook):
apply_patch(hook_file, cwd=place)
elif re.match(r'.+\\.(zip|7z)$', hook):
elif re.match(r'.+\.(zip|7z)$', hook):
extract_archive(hook_file, cwd=place)
else:
print('Running hook {0} in {1}'.format(hook, place))