Mail archive
alpine-devel

[alpine-devel] [PATCH 27/31] apkgrel: handle missing pkgrel in do_add

From: Dubiousjim <dubiousjim_at_gmail.com>
Date: Fri, 5 Jul 2013 00:21:36 -0400

---
 apkgrel.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/apkgrel.in b/apkgrel.in
index 83c89fd..7e33e34 100644
--- a/apkgrel.in
+++ b/apkgrel.in
_at_@ -49,7 +49,10 @@ do_add () {
 			&& continue
 		[ -d "$f" ] && f="$f/APKBUILD"
 		old=$(show_plain "$f")
-		setto=$(($old + 1))
+		case $old in
+		[0-9]*) setto=$((old + 1));;
+		*) setto=0;;
+		esac
 		do_set "$f" || return 1
 	done
 }
-- 
1.8.3.1
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Jul 05 2013 - 00:21:36 UTC