From 59be83ca19f815861ef544217f8909a766fe56d0 Mon Sep 17 00:00:00 2001 From: Sertonix Date: Mon, 29 Apr 2024 14:56:18 +0200 Subject: [PATCH] functions.sh: overwrite ABUILD_USERDIR from env To be consistent with other variables ABUILD_USERDIR set from the environment should be prefered over ABUILD_USERDIR set by the ABUILD_CONF file. --- functions.sh.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.sh.in b/functions.sh.in index 9fc79e1..7b00980 100644 --- a/functions.sh.in +++ b/functions.sh.in @@ -64,7 +64,7 @@ hostspec_to_libc() { } readconfig() { - local _APORTSDIR _BUILDDIR _PKGDEST _SRCPKGDEST _REPODEST _SRCDEST + local _APORTSDIR _BUILDDIR _PKGDEST _SRCPKGDEST _REPODEST _SRCDEST _ABUILD_USERDIR local _CC=gcc _CXX=g++ _LD=ld _CARCH _CHOST _CTARGET _CPPFLAGS _CFLAGS _CXXFLAGS _LDFLAGS local _JOBS _MAKEFLAGS _PACKAGER _USE_COLORS _USE_CCACHE local _BUILDCC _BUILDCXX _BUILDLD _BUILDCPPFLAGS _BUILDCXXFLAGS _BUILDCFLAGS @@ -76,6 +76,7 @@ readconfig() { [ -n "${SRCPKGDEST+x}" ] && _SRCPKGDEST=$SRCPKGDEST [ -n "${REPODEST+x}" ] && _REPODEST=$REPODEST [ -n "${SRCDEST+x}" ] && _SRCDEST=$SRCDEST + [ -n "${ABUILD_USERDIR+x}" ] && _ABUILD_USERDIR=$ABUILD_USERDIR [ -n "${CC+x}" ] && _CC=$CC [ -n "${CXX+x}" ] && _CXX=$CXX [ -n "${LD+x}" ] && _LD=$LD @@ -101,7 +102,7 @@ readconfig() { [ -f "$ABUILD_DEFCONF" ] && . "$ABUILD_DEFCONF" : ${ABUILD_CONF:=$sysconfdir/abuild.conf} [ -f "$ABUILD_CONF" ] && . "$ABUILD_CONF" - : ${ABUILD_USERDIR:=$HOME/.abuild} + ABUILD_USERDIR=${_ABUILD_USERDIR-${ABUILD_USERDIR:-$HOME/.abuild}} : ${ABUILD_USERCONF:=$ABUILD_USERDIR/abuild.conf} [ -f "$ABUILD_USERCONF" ] && . "$ABUILD_USERCONF" APORTSDIR=${_APORTSDIR-$APORTSDIR}