From 988186b19da6fe7c3e5ec8e382c407fb2b31f98a Mon Sep 17 00:00:00 2001 From: XGQT Date: Sun, 8 Mar 2020 13:31:02 +0100 Subject: [PATCH] eprefix-activate: chech if user is on a prefix profile --- eprefix-activate | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/eprefix-activate b/eprefix-activate index 9621da8..7b4f577 100644 --- a/eprefix-activate +++ b/eprefix-activate @@ -142,6 +142,23 @@ export PAGER FEATURES="${FEATURES} -usersandbox -sandbox" export FEATURES +# Check if we are on a prefix profile +if command_exists eselect +then + eprofile="$(eselect profile show)" + + if [[ "${eprofile}" == *prefix* ]] + then + echo "${eprefix_good} ${eprofile}" + else + echo "${eprefix_bad} You are not on a prefix profile" + fi + + unset eprofile +else + echo "${eprefix_bad} Could not determine running profile" +fi + # >>> Finish