summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-09 14:24:36 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-09 14:24:36 -0600
commit5ead2a2d3b029dbdc616c282d7aa6b6fc7ea7907 (patch)
treedbe03e004ca908924ccd173cc5b959d7043b2b7f
parent9bf803fd3437ebd396d9c3dd44ba3c77dbeaef58 (diff)
downloadscripts-5ead2a2d3b029dbdc616c282d7aa6b6fc7ea7907.tar.gz
scripts-5ead2a2d3b029dbdc616c282d7aa6b6fc7ea7907.zip
Update commit_all_submodules script
-rwxr-xr-xcommit_all_submodules9
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