From 6adf2b864fdbcb9cd57d427e6e411e6f09f83ef2 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Mon, 18 Nov 2019 13:20:14 -0500 Subject: scripts/paxmark.sh: source the profiles for PAX_MARKINGS Thanks chutzpah@gentoo.org Signed-off-by: Anthony G. Basile --- scripts/paxmark.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/paxmark.sh b/scripts/paxmark.sh index 6491af1..7fb0ead 100755 --- a/scripts/paxmark.sh +++ b/scripts/paxmark.sh @@ -86,15 +86,21 @@ paxmarksh() { return ${ret} } -MAKE_CONF="/etc/portage/make.conf" - -if [[ -d $MAKE_CONF ]]; then - for MC in $MAKE_CONF/*; do - source $MC - done -elif [[ -e $MAKE_CONF ]]; then - source $MAKE_CONF +if command -v portageq >/dev/null; then + PAX_MARKINGS="$(portageq envvar PAX_MARKINGS)" fi -PAX_MARKINGS=${PAX_MARKINGS:="none"} +if [[ -z ${PAX_MARKINGS} ]]; then + MAKE_CONF="/etc/portage/make.conf" + + if [[ -d ${MAKE_CONF} ]]; then + for MC in "${MAKE_CONF}"/*; do + source "${MC}" + done + elif [[ -r ${MAKE_CONF} ]]; then + source "${MAKE_CONF}" + fi +fi + +: "${PAX_MARKINGS:="none"}" paxmarksh "$@" -- cgit v1.2.3-65-gdbad