Update mplayer submodule (drop libmpeg2 and internal tremor)
[mplayer-build.git] / disable-mt
blob3efda35194b3622bef4728494df27288d66524a8
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 git = GitWrapper()
11 open('ffmpeg-mt-disabled', 'w').close()
12 if path.exists('ffmpeg-mt-enabled'):
13 os.remove('ffmpeg-mt-enabled')
14 # Allow setups where both ffmpeg and ffmpeg-mt are checked out
15 # simultaneously, and leave the directories alone in that case.
16 if path.exists('ffmpeg-mt/.git') and not path.exists('ffmpeg/.git'):
17 # ffmpeg should be an empty directory if things are right
18 os.rmdir('ffmpeg')
19 os.rename('ffmpeg-mt', 'ffmpeg')
20 os.mkdir('ffmpeg-mt')
21 if git.supports_nofetch:
22 cmd = 'git submodule update --no-fetch'.split()
23 else:
24 cmd = 'git submodule update'.split()
25 check_call(cmd + ['ffmpeg'])
26 os.chdir('ffmpeg')
27 def func(cmd=cmd):
28 check_call(cmd)
29 git.foreach_module(func)
31 main()