summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/abuild.in b/abuild.in
index b1be8fc..8d69b4b 100644
--- a/abuild.in
+++ b/abuild.in
@@ -594,6 +594,12 @@ runpart() {
local part=$1
[ -n "$DEBUG" ] && msg "$part"
trap "die '$part failed'" EXIT
+ if [ -d "$builddir" ]; then
+ case "$part" in
+ prepare|build|package|check)
+ cd "$builddir";;
+ esac
+ fi
$part
trap - EXIT
}