From 1c769bd9536fdc593a84d9e98739c1a7739d4963 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Aug 2016 09:29:10 +0200 Subject: Improve modup script --- modup.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modup.sh b/modup.sh index ea7c0a9..33cf1fc 100755 --- a/modup.sh +++ b/modup.sh @@ -16,13 +16,14 @@ for i in $sub_modules; do cd $i git submodule update --remote $* - # In case our submodules have their own submodules. - # - git submodule update --init --recursive $* + if [ $? -ne 0 ]; then + echo "submodule update FAILED" 1>&2 + exit 1 + fi - # Set it back to remote's HEAD. + # In case our submodules have their own submodules. # - git submodule update --remote $* + git submodule foreach git submodule update --init --recursive if [ $? -ne 0 ]; then echo "submodule update FAILED" 1>&2 -- cgit v1.1