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