diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2019-11-18 13:20:14 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2019-11-18 13:21:23 -0500 |
commit | 23c756701fff52a60bf7efb841824998a0752073 (patch) | |
tree | ab9c1433d5ff34909c106154334d2e163a9cc682 | |
parent | install-xattr: fix mangling of parameter order by getopt_long() (diff) | |
download | elfix-0.9.x.tar.gz elfix-0.9.x.tar.bz2 elfix-0.9.x.zip |
scripts/paxmark.sh: source the profiles for PAX_MARKINGSelfix-0.9.x
Thanks chutzpah@gentoo.org
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rwxr-xr-x | scripts/paxmark.sh | 24 |
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 "$@" |