summaryrefslogtreecommitdiff
path: root/git/commit.sh
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:37:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:37:11 +0200
commit8899a8271338ba19f32bae1b30e0df0392afe1bc (patch)
tree6644c5b51a302da9c6f1e35e5478707aa6cc321f /git/commit.sh
parent7da455da65d4c6ca7c58cf915f158349184373f0 (diff)
Add error handling to git scripts
Diffstat (limited to 'git/commit.sh')
-rwxr-xr-xgit/commit.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/git/commit.sh b/git/commit.sh
index 16a8076..cc05cf5 100755
--- a/git/commit.sh
+++ b/git/commit.sh
@@ -38,8 +38,20 @@ for i in $modules; do
cd $i
if [ "$add" = "y" ]; then
git add .
+
+ if [ $? -ne 0 ]; then
+ echo "add FAILED" 1>&2
+ exit 1
+ fi
+
fi
git commit -F $msg_file
+
+ if [ $? -ne 0 ]; then
+ echo "commit FAILED" 1>&2
+ exit 1
+ fi
+
cd $wd
done