diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-09 14:24:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-09 14:24:36 -0600 |
commit | 5ead2a2d3b029dbdc616c282d7aa6b6fc7ea7907 (patch) | |
tree | dbe03e004ca908924ccd173cc5b959d7043b2b7f | |
parent | 9bf803fd3437ebd396d9c3dd44ba3c77dbeaef58 (diff) | |
download | scripts-5ead2a2d3b029dbdc616c282d7aa6b6fc7ea7907.tar.gz scripts-5ead2a2d3b029dbdc616c282d7aa6b6fc7ea7907.zip |
Update commit_all_submodules script
-rwxr-xr-x | commit_all_submodules | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/commit_all_submodules b/commit_all_submodules index 0b902cf..2ade46f 100755 --- a/commit_all_submodules +++ b/commit_all_submodules @@ -20,8 +20,13 @@ read -p "Enter your commit message []: " -e commitmessage git submodule foreach "git commit -a -m \"$commitmessage\" || true" git submodule foreach "sed -i \"s/system@scm\.trinitydesktop\.org/$gituser@scm\.trinitydesktop\.org/g\" .git/config" -git submodule foreach "git push origin master || true" +git submodule foreach "git pull && git push origin master" +RETCODE=$? +if [[ $RETCODE != 0 ]]; then + echo "Something went wrong" + exit 1 +fi git commit -a -m "$commitmessage" || true sed -i "s/system@scm\.trinitydesktop\.org/$gituser@scm\.trinitydesktop\.org/g" .git/config -git push origin master || true +git pull && git push origin master || true |