summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apkgrel.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/apkgrel.in b/apkgrel.in
index 83c89fd..7e33e34 100644
--- a/apkgrel.in
+++ b/apkgrel.in
@@ -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
}