5 from subprocess
import check_call
7 from script
.helpers
import 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
18 os
.rename('ffmpeg-mt', 'ffmpeg')
20 if git
.supports_nofetch
:
21 cmd
= 'git submodule update --no-fetch'.split()
23 cmd
= 'git submodule update'.split()
24 check_call(cmd
+ ['ffmpeg'])
28 git
.foreach_module(func
)