summaryrefslogtreecommitdiff
path: root/abump.in
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-07-20 21:18:06 -0400
committerMax Rees <maxcrees@me.com>2019-07-20 21:20:21 -0400
commitf02eb097f88d3ab89765d041a78fbcd96baf2039 (patch)
tree1ace7167e60de5cceff90c55da6b3933580e7f11 /abump.in
parent164e656bacd0526c41f94b670e2c6ac23da35080 (diff)
downloadabuild-f02eb097f88d3ab89765d041a78fbcd96baf2039.tar.gz
abuild-f02eb097f88d3ab89765d041a78fbcd96baf2039.tar.bz2
abuild-f02eb097f88d3ab89765d041a78fbcd96baf2039.tar.xz
abuild-f02eb097f88d3ab89765d041a78fbcd96baf2039.zip
abuild, abump: use type(1) portably
Diffstat (limited to 'abump.in')
-rw-r--r--abump.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/abump.in b/abump.in
index efeb481..ee2df1e 100644
--- a/abump.in
+++ b/abump.in
@@ -49,8 +49,13 @@ do_bump() {
name=${name#*/}
[ "$pkgname" = "$name" ] \
|| die "APKBUILD has different \$pkgname for $name"
- type package | grep -q function \
- || die "missing package() for $name"
+
+ (
+ unset -f package || true
+ unalias package || true
+ . "$a"
+ PATH= type package >/dev/null 2>&1
+ ) || die "missing package() for $name"
cd "${a%/*}"
section=${PWD%/*}