mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
aedi: fetch from remote repo if source directory exists
This commit is contained in:
parent
ac324a8b06
commit
405d1a3b1f
1 changed files with 5 additions and 2 deletions
|
@ -69,9 +69,12 @@ class BuildState:
|
|||
return self.platform.cxx_compiler if self.platform else ''
|
||||
|
||||
def checkout_git(self, url: str, branch: str = 'master'):
|
||||
if not os.path.exists(self.source):
|
||||
if os.path.exists(self.source):
|
||||
args = ('git', 'fetch', '--all', '--tags')
|
||||
subprocess.run(args, cwd=self.source, check=True)
|
||||
else:
|
||||
args = ('git', 'clone', '--recurse-submodules', url, self.source)
|
||||
subprocess.check_call(args, cwd=self.root_path)
|
||||
subprocess.run(args, cwd=self.root_path, check=True)
|
||||
|
||||
if self.checkout_commit:
|
||||
checkout_args = (self.checkout_commit,)
|
||||
|
|
Loading…
Reference in a new issue