diff options
-rwxr-xr-x | abump.in | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -25,22 +25,22 @@ do_bump() { name=${p%-[0-9]*} ver=${p#${name}-} - # calculate APKBUILD's path + ( + set -e + + # calculate APKBUILD's path #vim syntax higlight ' if [ "${name#*/}" != "$name" ] && ! [ -d "$APORTSDIR/${name%/*}" ]; then - error "'$p' should be of form 'foo-1.2.3' or 'main/foo-1.2.3'" - rc=1; continue + die "'$p' should be of form 'foo-1.2.3' or 'main/foo-1.2.3'" fi - a=$(aports_buildscript "$name" || die "can't find APKBUILD for $name") || { rc=1; continue; } + a=$(aports_buildscript "$name" ) \ + || die "can't find APKBUILD for $name" # verify APKBUILD - ( . "$a" || exit 1 - [ "$pkgname" = "$name" ] || die "APKBUILD has different \$pkgname for $name" - type package | grep -q function || die "missing package() for $name" - ) || { rc=1; continue; } - - ( - set -e + [ "$pkgname" = "$name" ] \ + || die "APKBUILD has different \$pkgname for $name" + type package | grep -q function \ + || die "missing package() for $name" cd "${a%/*}" section=${PWD%/*} @@ -63,7 +63,8 @@ fixes #${fixes#\#} git add APKBUILD git commit -m"$message" - ) || rc=1 + ) + rc=$(( $rc + $? )) done return $rc } |