summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-02-17 13:53:50 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-17 15:17:44 +0200
commitad46156cc733e30eeb864573a7c2b3300b4ba465 (patch)
tree0765b3bbe5efbddc3e1e9e7fe1e828052f481f91 /abuild.in
parent2c1aaa5536d601c4203c4ba451141578beeeee16 (diff)
downloadabuild-ad46156cc733e30eeb864573a7c2b3300b4ba465.tar.gz
abuild-ad46156cc733e30eeb864573a7c2b3300b4ba465.tar.bz2
abuild-ad46156cc733e30eeb864573a7c2b3300b4ba465.tar.xz
abuild-ad46156cc733e30eeb864573a7c2b3300b4ba465.zip
abuild: use $builddir in default_prepare only if it exists
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 6d93e1f..5c6f229 100644
--- a/abuild.in
+++ b/abuild.in
@@ -587,10 +587,11 @@ have_patches() {
default_prepare() {
local i
- cd "$builddir" || { error "Is \$builddir set correctly?"; return 1; }
+ [ -n "$builddir" -a -d "$builddir" ] && cd "$builddir"
if ! have_patches; then
return 0
fi
+ [ -d "$builddir" ] || { error "Is \$builddir set correctly?"; return 1; }
for i in $source; do
case ${i%::*} in
*.patch)