mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-25 13:21:05 +00:00
build script: avoid downloading when source path is specified explicitly
This commit is contained in:
parent
562c4b5343
commit
0db9b43984
1 changed files with 5 additions and 0 deletions
5
build.py
5
build.py
|
@ -1832,9 +1832,11 @@ class Builder(object):
|
||||||
if arguments.target:
|
if arguments.target:
|
||||||
self.target = self.targets[arguments.target]
|
self.target = self.targets[arguments.target]
|
||||||
self.source_path = self.root_source_path + self.target.name + os.sep
|
self.source_path = self.root_source_path + self.target.name + os.sep
|
||||||
|
self.external_source = False
|
||||||
else:
|
else:
|
||||||
assert arguments.source_path
|
assert arguments.source_path
|
||||||
self.source_path = arguments.source_path + os.sep
|
self.source_path = arguments.source_path + os.sep
|
||||||
|
self.external_source = True
|
||||||
self._detect_target()
|
self._detect_target()
|
||||||
|
|
||||||
if not self.build_path:
|
if not self.build_path:
|
||||||
|
@ -2259,6 +2261,9 @@ class Builder(object):
|
||||||
subprocess.check_call(args, cwd=extract_path)
|
subprocess.check_call(args, cwd=extract_path)
|
||||||
|
|
||||||
def download_source(self, url: str, checksum: str):
|
def download_source(self, url: str, checksum: str):
|
||||||
|
if self.external_source:
|
||||||
|
return
|
||||||
|
|
||||||
os.makedirs(self.source_path, exist_ok=True)
|
os.makedirs(self.source_path, exist_ok=True)
|
||||||
|
|
||||||
data, filepath = self._read_source_package(url)
|
data, filepath = self._read_source_package(url)
|
||||||
|
|
Loading…
Reference in a new issue