diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-02-04 10:39:42 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-02-04 10:39:42 +0100 |
commit | 79e1f837ef7e7c402fd6e9dbb167aac695f2aee7 (patch) | |
tree | 782121d24747f1aaa74a49ff9ea7fae57caee4a0 /utils/lib.sh | |
parent | 94ac560dcc85e2e75d3b14706a65eb9488643eb4 (diff) | |
download | searxng-79e1f837ef7e7c402fd6e9dbb167aac695f2aee7.tar.gz searxng-79e1f837ef7e7c402fd6e9dbb167aac695f2aee7.zip |
utils & Makefile: add .config.mk & .config.sh for searx brands
By isolating the environment of makefiles and bash scripts into .config.mk and
.config.sh it is simple to maintain searx brands by setting some central
environments.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/lib.sh')
-rwxr-xr-x | utils/lib.sh | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/utils/lib.sh b/utils/lib.sh index 78641cc0b..05ff5e594 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -32,18 +32,15 @@ if [[ -z ${DIFF_CMD} ]]; then fi fi -DOT_CONFIG="${DOT_CONFIG:-${REPO_ROOT}/.config}" +DOT_CONFIG="${DOT_CONFIG:-${REPO_ROOT}/.config.sh}" source_dot_config() { - if [[ ! -e "$DOT_CONFIG" ]]; then - info_msg "installing $DOT_CONFIG" - cp "$(dirname "${BASH_SOURCE[0]}")/dot_config" "$DOT_CONFIG" - if [[ ! -z ${SUDO_USER} ]]; then - chown "${SUDO_USER}:${SUDO_USER}" "$DOT_CONFIG" - fi + if [[ ! -e "${DOT_CONFIG}" ]]; then + err_msg "configuration does not extsts at: ${DOT_CONFIG}" + return 42 fi # shellcheck disable=SC1090 - source "${REPO_ROOT}/.config" + source "${DOT_CONFIG}" } sudo_or_exit() { |