From 9d90b7eb2bba17af3b7720caa9935f560c0cadfa Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Fri, 3 Feb 2012 18:12:19 +0100 Subject: init.sh: support for "post_get", git clone recursive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Pokorný --- init.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index b7e709f..149cadc 100755 --- a/init.sh +++ b/init.sh @@ -55,7 +55,7 @@ do_git_submodule () { announce "$1 $submodule (git submodule)" if [ "$1" == "get" ]; then pushd "$(git rev-parse --show-toplevel)" 2>/dev/null - git submodule update --init "${git_prefix}${submodule}" 2>&1 + git submodule update --init --recursive "${git_prefix}${submodule}" 2>&1 popd 2>/dev/null else do_del "$submodule" @@ -103,6 +103,12 @@ do_svn () { check_ret $? } +do_post_get () { + # usage: $1=action ($1 passed from main), $2..$N command + args + [ "$1" != "get" ] || "${@:2}" + check_ret $? +} + # # source the choices (./init-* files) and go # -- cgit