4 # Use a depth greater than 1 for shallow clones to reduce the chance that
5 # required submodule versions are not fetched when all branch heads in the
6 # corresponding repo have moved ahead.
11 clone_flags
="--depth 100"
14 echo "Unknown parameter: $ac_option"
21 # Do things manually instead of using "git submodule update --init",
22 # because git's sucky submodule support has no way of giving options to
23 # the "git clone" command that would be needed for shallow clones.
28 if test ! -e $1/.git
; then
29 git clone
$clone_flags `git config --get submodule.$1.url` $1
30 git submodule update
--no-fetch $1
33 git submodule update
$1
37 submodule_clone mplayer
39 if test -e ffmpeg-mt-enabled
; then
40 submodule_clone ffmpeg-mt
42 submodule_clone ffmpeg
45 submodule_clone libass
47 # Ensure sync, needed at least if both ffmpeg and ffmpeg-mt exist separately
48 MPBUILD_COMMAND
='git submodule sync' "`pwd`"/script
/foreach_submodule
50 # Init recursive submodules (libswscale under ffmpeg) - not trying to
51 # make this support shallow clones for now
52 MPBUILD_COMMAND
='git submodule update --init' "`pwd`"/script
/foreach_submodule nottop