Fix vf_tcdump's compilation
[mplayer/kovensky.git] / build / update
blob877a68cf8372b181d069cf589b65e472f0d8cd8d
1 #!/usr/bin/env python
3 import os
4 from os import path
5 from subprocess import check_call
7 from script.helpers import GitWrapper
9 def main():
10 os.chdir('..')
11 git = GitWrapper()
12 check_call('git pull'.split())
13 config = git.get_config()
14 submodules = git.get_submodules()
15 # Update existing submodules, but don't check out new ones
16 for p in submodules:
17 if not 'submodule.%s.url' % p in config:
18 continue
19 if not path.exists(path.join(p, '.git')):
20 continue
21 check_call('git submodule update'.split() + [p])
22 def cmd():
23 check_call('git submodule update --init'.split())
24 git.foreach_submodule(cmd)
26 main()