Commit 2fe29d58 authored by Natanael Copa's avatar Natanael Copa

abuild: chdir to $builddir if it exists

chdir to $builddir before running prepare, build, package or check.
parent 4e455979
...@@ -594,6 +594,12 @@ runpart() { ...@@ -594,6 +594,12 @@ runpart() {
local part=$1 local part=$1
[ -n "$DEBUG" ] && msg "$part" [ -n "$DEBUG" ] && msg "$part"
trap "die '$part failed'" EXIT trap "die '$part failed'" EXIT
if [ -d "$builddir" ]; then
case "$part" in
prepare|build|package|check)
cd "$builddir";;
esac
fi
$part $part
trap - EXIT trap - EXIT
} }
......
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