mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Directory Structure [step 1]: moving files
working on #672 NOTE: This commit can't be compiled!!
This commit is contained in:
11
apps/bash_shared/defines.sh
Normal file
11
apps/bash_shared/defines.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
unamestr=`uname`
|
||||
if [[ "$unamestr" == 'Darwin' ]]; then
|
||||
AC_PATH_ROOT=$(greadlink -f "$AC_PATH_BIN/../")
|
||||
else
|
||||
AC_PATH_ROOT=$(readlink -f "$AC_PATH_BIN/../")
|
||||
fi
|
||||
|
||||
AC_PATH_CONF="$AC_PATH_ROOT/conf"
|
||||
|
||||
AC_PATH_MODULES="$AC_PATH_ROOT/modules"
|
||||
|
||||
35
apps/bash_shared/includes.sh
Normal file
35
apps/bash_shared/includes.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
[[ ${GUARDYVAR:-} -eq 1 ]] && return || readonly GUARDYVAR=1 # include it once
|
||||
|
||||
# force default language for applications
|
||||
LC_ALL=C
|
||||
|
||||
AC_PATH_BIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
|
||||
|
||||
AC_PATH_SHARED="$AC_PATH_BIN/bash_shared"
|
||||
|
||||
source "$AC_PATH_SHARED/defines.sh"
|
||||
|
||||
source "$AC_PATH_MODULES/hw-core/bash-lib-event/src/hooks.sh"
|
||||
|
||||
|
||||
function registerHooks() { hwc_event_register_hooks "$@"; }
|
||||
function runHooks() { hwc_event_run_hooks "$@"; }
|
||||
|
||||
source "$AC_PATH_CONF/config.sh.dist" # "hack" to avoid missing conf variables
|
||||
|
||||
if [ -f "$AC_PATH_CONF/config.sh" ]; then
|
||||
source "$AC_PATH_CONF/config.sh" # should overwrite previous
|
||||
else
|
||||
echo "NOTICE: file <$AC_PATH_CONF/config.sh> has not been found, you should create and configure it."
|
||||
fi
|
||||
|
||||
#
|
||||
# Load modules
|
||||
#
|
||||
|
||||
for entry in "$AC_PATH_MODULES/"*/include.sh
|
||||
do
|
||||
if [ -e $entry ]; then
|
||||
source $entry
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user