etools/etools.conf
2024-09-15 20:30:45 +02:00

54 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# shellcheck disable=SC2034
# INFO: the default flags can be founc in config.sh
# The find command to run
# ETOOLS_FIND_CMD=${ETOOLS_FIND_CMD:-"fd"}
# The Argyments passed to the find command
# ETOOLS_FIND_ARGS=${ETOOLS_FIND_ARGS:-"--exclude example"}
# A full command that may be specified if FIND_CMD and FIND_ARGS cannot fulfill the needed job
# use {package} as a wildcart for the package that should be search for
# use {repo} as a wildcart for the repo to search
# use any other variable from ETOOLS inside it
# ETOOLS_FIND_COMMAND="fd ${ETOOLS_FIND_ARGS} {package} {repo}"
# The default path in which to look for the repos
# ETOOLS_REPO_PATH=${ETOOLS_REPO_PATH:-"/var/db/repos"}
# ETOOLS_COLOR_INFO=${ETOOLS_COLOR_INFO:-'\033[1;34m'}
# ETOOLS_COLOR_WARN=${ETOOLS_COLOR_WARN:-'\033[1;33m'}
# ETOOLS_COLOR_ERROR=${ETOOLS_COLOR_ERROR:-'\033[1;31m'}
# ETOOLS_GREP_CMD=${ETOOLS_GREP_CMD:-"rg"}
# This declares an associative array with a regex as key and relative numbers as weights
declare -Ag package_weights
package_weights["-bin"]=-10
package_weights["dev-cpp"]=-3
package_weights["dev-python"]=-5
package_weights["dev-haskell"]=-15
package_weights["gnustep-base"]=-5
ETOOLS_DEBUG=false
# define custom function that will be called to set package weights
# note that function names must start with `etools_find_sort`
# function etools_find_sort_custom() {
# for package in "${!_etools_packages[@]}"; do
# if [[ $package =~ -bin ]]; then
# _etools_packages["$package"]=$((_etools_packages["$package"] - 30))
# fi
# done
# }
# vim: filetype=sh