From 2760f35c57e86ad1396d7dd9d26cc4e37f84a430 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 22 Jul 2013 13:57:14 +0000
Subject: [PATCH] abump: print what packages failed

---
 abump.in | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/abump.in b/abump.in
index b0994ed807e0..2b0ca01d494f 100755
--- a/abump.in
+++ b/abump.in
@@ -18,7 +18,7 @@ fi
 
 # version bump packages
 do_bump() {
-	local p rc=0 name ver section message
+	local p rc=0 errors=0 failed= name ver section message
 	local upgrade="${cvelist:+security }upgrade"
 	local a
 	for p; do
@@ -64,9 +64,15 @@ fixes #${fixes#\#}
 		git add APKBUILD
 		git commit -m"$message"
 		)
-		rc=$(( $rc + $? ))
+		if [ $? -ne 0 ]; then
+			errors=$(( $errors + 1 ))
+			failed="$failed $p"
+		fi
 	done
-	return $rc
+	if [ -n "$failed" ]; then
+		error "Failed: $failed"
+	fi
+	return $errors
 }
 
 usage() {
-- 
GitLab