diff options
Diffstat (limited to 'apps/bash_shared/common.sh')
-rw-r--r-- | apps/bash_shared/common.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/bash_shared/common.sh b/apps/bash_shared/common.sh index ed0859319c..c8d8880cf8 100644 --- a/apps/bash_shared/common.sh +++ b/apps/bash_shared/common.sh @@ -1,12 +1,15 @@ -function registerHooks() { hwc_event_register_hooks "$@"; } -function runHooks() { hwc_event_run_hooks "$@"; } +function registerHooks() { acore_event_registerHooks "$@"; } +function runHooks() { acore_event_runHooks "$@"; } source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables -if [ -f "$AC_PATH_CONF/config.sh" ]; then - source "$AC_PATH_CONF/config.sh" # should overwrite previous +# 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 <$AC_PATH_CONF/config.sh> has not been found, you should create and configure it." + echo "NOTICE: file <$USER_CONF_PATH> has not been found, you should create and configure it." fi # @@ -15,7 +18,7 @@ fi for entry in "$AC_PATH_MODULES/"*/include.sh do - if [ -e "$entry" ]; then + if [ -e "$entry" ]; then source "$entry" fi done |