add git clone of Q2RePack to scons target=setup

This commit is contained in:
ttimo 2023-08-20 15:36:08 -05:00
parent 980356d87e
commit 8354fe8f53

View file

@ -52,6 +52,7 @@ class Config:
'WolfPack',
'UnvanquishedPack',
'Q1Pack',
'Q2RePack',
]
def __repr__( self ):
@ -284,9 +285,22 @@ class Config:
print( repr( cmd ) )
subprocess.check_call( cmd )
def GitCloneOrUpdate( self, git_url, path ):
if os.path.exists( path ):
cmd = [ 'git', 'pull' ]
print( repr( cmd ) )
subprocess.check_call( cmd, cwd = path )
else:
cmd = [ 'git', 'clone', git_url, path ]
print( repr( cmd ) )
subprocess.check_call( cmd )
def FetchGamePaks( self, path ):
for pak in self.setup_packs:
pak_path = os.path.join( path, 'installs', pak )
if pak == 'Q2RePack':
self.GitCloneOrUpdate( 'https://github.com/TTimo/Q2RePack.git', pak_path )
continue
if pak == 'UnvanquishedPack':
svnurl = 'https://github.com/Unvanquished/unvanquished-mapeditor-support.git/trunk/build/gtkradiant/'
else: