summaryrefslogtreecommitdiffstats
path: root/FUNCTIONS
diff options
context:
space:
mode:
authorThomas Orgis2015-03-20 13:48:37 +0100
committerThomas Orgis2015-03-20 13:49:45 +0100
commitd05f2932783549b602c120cfbb3372e3728dc1d7 (patch)
tree6697fd22892b1b562b62de61521ef112556944d5 /FUNCTIONS
parent7736e5df69ef798f57f839bcae345a3f486010be (diff)
FUNCTIONS: added get_spell_provider_file
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-xFUNCTIONS13
1 files changed, 13 insertions, 0 deletions
diff --git a/FUNCTIONS b/FUNCTIONS
index eabb067efd..b991bae1d7 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -727,6 +727,19 @@ if spell_ok $1 &&
fi
}
+#---
+## Find a file matching some pattern(s) as installed by the chosen
+## provider, e.g. /usr/bin/python3 for python3 providing PYTHON.
+## @params $1 - spell at hand
+## @params $2 - provider name (PYTHON)
+## @params $3 - expression for grep
+#---
+function get_spell_provider_file(){
+ gaze install $(get_spell_provider "$1" "$2") \
+ | grep "$3" | sort | head -n 1
+}
+
+
. $GRIMOIRE/glselect.function
. $GRIMOIRE/bzr_download.function
. $GRIMOIRE/hg_download.function