aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-16 09:29:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-16 09:29:10 +0200
commit1c769bd9536fdc593a84d9e98739c1a7739d4963 (patch)
treecc7d91f004e6e7f4dcea8943df91a68ed5dd164c
parent861f9891045178af212cfd0d6034076aafffadca (diff)
Improve modup script
-rwxr-xr-xmodup.sh11
1 files 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