xbps-src: source cross profiles in show-var when using -a switch.

This allows the user to query for variables such as XBPS_CROSS_TRIPLET,
which are only available in a cross-build context.
This commit is contained in:
Érico Rolim 2020-12-18 16:22:32 -03:00 committed by Érico Nogueira Rolim
parent ce989fc88d
commit ec223373c6

View File

@ -902,7 +902,11 @@ case "$XBPS_TARGET" in
for f in ${XBPS_COMMONDIR}/environment/setup/*.sh; do
source $f
done
source ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
if [ "$XBPS_CROSS_BUILD" ]; then
source ${XBPS_COMMONDIR}/cross-profiles/${XBPS_CROSS_BUILD}.sh
else
source ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
fi
eval value="\${$XBPS_TARGET_PKG}"
echo $value
;;