aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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