Update libass submodule
[mplayer-build.git] / update
blob5e6a7472d6aae9fb296b045ad7853255c6df68ea
1 #!/usr/bin/env python
3 from os import path
4 from subprocess import check_call
6 from script.helpers import run_foreach_submodule, 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 run_foreach_submodule('git submodule update --init', 'nottop')
22 main()