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