finish smart_find
This commit is contained in:
parent
15f36caa5f
commit
ee614d2c2a
1
etools
1
etools
@ -35,6 +35,7 @@ function etools_smart_find() {
|
|||||||
fi
|
fi
|
||||||
# unset helper functions
|
# unset helper functions
|
||||||
./helper.sh
|
./helper.sh
|
||||||
|
unset _etools_packages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,11 +33,9 @@ function _formatted_find() {
|
|||||||
function _set_weights() {
|
function _set_weights() {
|
||||||
for package in "${!_etools_packages[@]}"; do
|
for package in "${!_etools_packages[@]}"; do
|
||||||
# $function "$key"
|
# $function "$key"
|
||||||
echo iterated
|
|
||||||
# TODO: figure out why this is not in scope
|
# TODO: figure out why this is not in scope
|
||||||
for regex in $package_weights; do
|
for regex in ${!package_weights[@]}; do
|
||||||
echo iterated inner
|
if [[ ${package//\"/} =~ ^*${regex}*$ ]]; then
|
||||||
if [[ ${package//\"/} =~ *${regex}* ]]; then
|
|
||||||
_etools_packages[${package//\"/}]=${package_weights[$regex]}
|
_etools_packages[${package//\"/}]=${package_weights[$regex]}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -78,7 +76,6 @@ function _filter() {
|
|||||||
# leave warning untils this is stable/fixed
|
# leave warning untils this is stable/fixed
|
||||||
for function in \
|
for function in \
|
||||||
_set_weights \
|
_set_weights \
|
||||||
_etools_print_assoc_array \
|
|
||||||
${functions[@]};
|
${functions[@]};
|
||||||
do
|
do
|
||||||
$function
|
$function
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user