From 8edfe566b5aa07f9cf8676ffdd61cedc48cf884a Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 14 Mar 2023 15:23:07 +0100 Subject: [PATCH] Allow to specify modules by path Signed-off-by: Florian Schmaus --- libs/core.bash.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/core.bash.in b/libs/core.bash.in index 740354e2748b..643b3276f313 100644 --- a/libs/core.bash.in +++ b/libs/core.bash.in @@ -69,6 +69,15 @@ die() { # Find module and echo its filename. Die if module doesn't exist. find_module() { local modname=$1 modpath + + if [[ ${modname} == */* ]]; then + if [[ ${modname} == *.eselect && -f ${modname} ]]; then + echo "${modname}" + return + fi + die -q "Can't load module ${modname}" + fi + for modpath in "${ESELECT_MODULES_PATH[@]}"; do if [[ -f ${modpath}/${modname}.eselect ]]; then echo "${modpath}/${modname}.eselect" -- 2.39.2