diff options
author | 2019-11-18 13:20:14 -0500 | |
---|---|---|
committer | 2019-11-18 13:20:26 -0500 | |
commit | 6adf2b864fdbcb9cd57d427e6e411e6f09f83ef2 (patch) | |
tree | 6d330ed41bd1e74a4e1335fe6606e6ec43a45a82 | |
parent | install-xattr: fix mangling of parameter order by getopt_long() (diff) | |
download | elfix-6adf2b864fdbcb9cd57d427e6e411e6f09f83ef2.tar.gz elfix-6adf2b864fdbcb9cd57d427e6e411e6f09f83ef2.tar.bz2 elfix-6adf2b864fdbcb9cd57d427e6e411e6f09f83ef2.zip |
scripts/paxmark.sh: source the profiles for PAX_MARKINGS
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 "$@" |