6 from subprocess
import check_call
8 from script
.helpers
import GitWrapper
11 print "Currently only ffmpeg-mt is supported."
14 open('ffmpeg-mt-disabled', 'w').close()
15 if path
.exists('ffmpeg-mt-enabled'):
16 os
.remove('ffmpeg-mt-enabled')
17 # Allow setups where both ffmpeg and ffmpeg-mt are checked out
18 # simultaneously, and leave the directories alone in that case.
19 if path
.exists('ffmpeg-mt/.git') and not path
.exists('ffmpeg/.git'):
20 # ffmpeg should be an empty directory if things are right
22 os
.rename('ffmpeg-mt', 'ffmpeg')
24 if git
.supports_nofetch
:
25 cmd
= 'git submodule update --no-fetch'.split()
27 cmd
= 'git submodule update'.split()
28 check_call(cmd
+ ['ffmpeg'])
32 git
.foreach_module(func
)