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