summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-20 16:22:22 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-02 23:13:31 +0200
commit4f37c8efd306335a9c3ac6862b0984c965bf270f (patch)
treef3199ae2c72cd354f7ff42963dd30302bcfe31f8 /abuild.in
parent35077b43e8ccacc50b3d2e379f57f22722eef054 (diff)
downloadabuild-4f37c8efd306335a9c3ac6862b0984c965bf270f.tar.bz2
abuild-4f37c8efd306335a9c3ac6862b0984c965bf270f.tar.xz
abuild: set default builddir when not defined in APKBUILD
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/abuild.in b/abuild.in
index 5dd0423..35b7995 100644
--- a/abuild.in
+++ b/abuild.in
@@ -568,8 +568,7 @@ default_prepare() {
if ! have_patches; then
return 0
fi
- cd "${builddir:-$srcdir/$pkgname-$pkgver}" \
- || { error "Is \$builddir set correctly?"; return 1; }
+ cd "$builddir" || { error "Is \$builddir set correctly?"; return 1; }
for i in $source; do
case $i in
*.patch)
@@ -2239,6 +2238,8 @@ export CC
cd "$startdir" || die
. "$APKBUILD"
+builddir=${builddir:-"$srcdir/$pkgname-$pkgver"}
+
# If REPODEST is set then it will override the PKGDEST
if [ -z "$REPODEST" ]; then
warning "REPODEST is not set and is now required. Defaulting to ~/packages"