Commit d4137305 authored by Natanael Copa's avatar Natanael Copa

abuild: don't cd to $builddir unless patches exists

some packages don't have patches. We should not error if builddir is not
set in this case.
parent 3e69161f
......@@ -530,8 +530,21 @@ getpkgver() {
fi
}
have_patches() {
local i
for i in $source; do
case "$i" in
*.patch) return 0;;
esac
done
return 1
}
default_prepare() {
local i
if ! have_patches; then
return 0
fi
cd "${builddir:-$srcdir/$pkgname-$pkgver}" \
|| { error "Is \$builddir set correctly?"; return 1; }
for i in $source; do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment