Permalink
Browse files

Exit if checking out a branch failed.

  • Loading branch information...
1 parent 7a0ce1e commit e12873b536e1ebb80d2e2b550e3f6736bde7fc75 @dscharrer dscharrer committed May 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 autobuild
View
4 autobuild
@@ -197,7 +197,7 @@ function build_branch() {
if [ ! "$branch" ] ; then return ; fi
cd "$repo"
- git checkout "origin/$branch" &> /dev/null || ( echo "error checking out branch $branch" ; return )
+ git checkout "origin/$branch" &> /dev/null || ( echo "error checking out branch $branch" ; exit 1 )
commit=`cat "$repo/.git/HEAD"`
@@ -233,7 +233,7 @@ function build_branch() {
# Build all remote branches.
for f in `dir -d $repo/.git/logs/refs/remotes/origin/* 2> /dev/null` ; do
branch="${f##*/}"
- build_branch "$branch"
+ build_branch "$branch" || exit 1
done
echo "Done, logs saved to $logs"

0 comments on commit e12873b

Please sign in to comment.