diff options
Diffstat (limited to 'apps/bash_shared')
| -rw-r--r-- | apps/bash_shared/common.sh | 20 | ||||
| -rw-r--r-- | apps/bash_shared/defines.sh | 2 | ||||
| -rw-r--r-- | apps/bash_shared/includes.sh | 2 |
3 files changed, 15 insertions, 9 deletions
diff --git a/apps/bash_shared/common.sh b/apps/bash_shared/common.sh index acd23eacdf..46422119b1 100644 --- a/apps/bash_shared/common.sh +++ b/apps/bash_shared/common.sh @@ -1,17 +1,19 @@ function registerHooks() { acore_event_registerHooks "$@"; } function runHooks() { acore_event_runHooks "$@"; } -#shellcheck source=../../conf/dist/config.sh -source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables +function acore_common_loadConfig() { + #shellcheck source=../../conf/dist/config.sh + source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables -# first check if it's defined in env, otherwise use the default -USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"} + # first check if it's defined in env, otherwise use the default + USER_CONF_PATH=${USER_CONF_PATH:-"$AC_PATH_CONF/config.sh"} -if [ -f "$USER_CONF_PATH" ]; then - source "$USER_CONF_PATH" # should overwrite previous -else - echo "NOTICE: file <$USER_CONF_PATH> not found, we use default configuration only." -fi + if [ -f "$USER_CONF_PATH" ]; then + source "$USER_CONF_PATH" # should overwrite previous + else + echo "NOTICE: file <$USER_CONF_PATH> not found, we use default configuration only." + fi +} # # Load modules diff --git a/apps/bash_shared/defines.sh b/apps/bash_shared/defines.sh index 4b014bd9c1..af9e9dfc97 100644 --- a/apps/bash_shared/defines.sh +++ b/apps/bash_shared/defines.sh @@ -25,4 +25,6 @@ export AC_PATH_MODULES="$AC_PATH_ROOT/modules" export AC_PATH_DEPS="$AC_PATH_ROOT/deps" +export AC_BASH_LIB_PATH="$AC_PATH_DEPS/acore/bash-lib/src" + export AC_PATH_VAR="$AC_PATH_ROOT/var" diff --git a/apps/bash_shared/includes.sh b/apps/bash_shared/includes.sh index d2bf07db12..679fc8e6d3 100644 --- a/apps/bash_shared/includes.sh +++ b/apps/bash_shared/includes.sh @@ -16,6 +16,8 @@ source "$AC_PATH_DEPS/acore/bash-lib/src/event/hooks.sh" # shellcheck source=./common.sh source "$AC_PATH_SHARED/common.sh" +acore_common_loadConfig + if [[ "$OSTYPE" = "msys" ]]; then AC_BINPATH_FULL="$BINPATH" else |
