aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/paxmark.sh24
1 files 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 "$@"