Commit 3b61bfb6 authored by Natanael Copa's avatar Natanael Copa

abuild: fix runpart

we need to run the function for runpart in the same shell, otherwise we
will lose the global variables set in the split functions.
parent 9c1595dc
...@@ -566,9 +566,9 @@ update_config_guess() { ...@@ -566,9 +566,9 @@ update_config_guess() {
runpart() { runpart() {
local part=$1 local part=$1
[ -n "$DEBUG" ] && msg "$part" [ -n "$DEBUG" ] && msg "$part"
abuild_function=$part "$abuild_path" \ trap "die '$part failed'" EXIT
$color_opt $nodeps $force $forceroot $keep $quiet \ $part
$install_deps $recursive $upgrade || die "$part failed" trap - EXIT
} }
# override those in your build script # override those in your build script
...@@ -2340,22 +2340,15 @@ controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname} ...@@ -2340,22 +2340,15 @@ controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
trap 'die "Aborted by user"' INT trap 'die "Aborted by user"' INT
if [ "$abuild_function" ]; then [ -z "$subpkgdir" ] && set_xterm_title "abuild${CROSS_COMPILE+-$CARCH}: $pkgname"
_function=$abuild_function
abuild_function=
$_function
else if [ -z "$1" ]; then
[ -z "$subpkgdir" ] && set_xterm_title "abuild${CROSS_COMPILE+-$CARCH}: $pkgname" set all
if [ -z "$1" ]; then
set all
fi
while [ $# -gt 0 ]; do
runpart $1
shift
done
fi fi
while [ $# -gt 0 ]; do
runpart $1
shift
done
cleanup cleanup
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