diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-30 19:18:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-30 19:18:57 +0200 |
commit | 0f0d0a0916c661e3c1bbc623200c1ce16e31701f (patch) | |
tree | cc0877d92dc1b55344fdc9b14de3f9b214792637 | |
parent | 68f9c25a76cb7794d9498bb2923eba997b099cc6 (diff) |
Add submodule update --remote script
-rwxr-xr-x | modup.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modup.sh b/modup.sh new file mode 100755 index 0000000..a725abe --- /dev/null +++ b/modup.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +# Update all submodules to remote HEAD by running: +# +# git submodule update --remote +# +# Normally you would follow this with commit. +# + +. etc/git/modules + +wd=`pwd` + +for i in $modules; do + echo "submodule update $i" 1>&2 + cd $i + git submodule update --remote $* + + if [ $? -ne 0 ]; then + echo "submodule update FAILED" 1>&2 + exit 1 + fi + + cd $wd +done |