summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
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)