mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
refactor(Core/Conf): Removal of unnecessary .dist file loading (#14707)
* Remove .dist file requirement * Remove unnecessary string cast * Add required variables for CI build configs * More required variables * Add some more default variables to reduce log output * One last default value to cut down log spam * Rewrite conf file bash script This should use the standard .dest file as a template * Change dir we copy the dest files from * actually use the correct file name * need to use double quotes for variables * add missing username * set the correct datadir * Attempt to fix dbimport Co-authored-by: Foereaper <foereaper@elunatech.com>
This commit is contained in:
@@ -3,19 +3,13 @@ CONFIG_FOLDER=${2:-"etc"}
|
||||
BIN_FOLDER=${3-"bin"}
|
||||
MYSQL_ROOT_PASSWORD=${4:-""}
|
||||
|
||||
# copy dist files to conf files
|
||||
cp ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf.dist ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
|
||||
|
||||
echo "LoginDatabaseInfo = \"localhost;3306;root;$MYSQL_ROOT_PASSWORD;acore_auth\"" >> ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
|
||||
|
||||
# worldserver or dbimport
|
||||
if [[ $APP_NAME != "authserver" ]]; then
|
||||
{
|
||||
echo "WorldDatabaseInfo = \"localhost;3306;root;$MYSQL_ROOT_PASSWORD;acore_world\""
|
||||
echo "CharacterDatabaseInfo = \"localhost;3306;root;$MYSQL_ROOT_PASSWORD;acore_characters\""
|
||||
} >> ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
|
||||
fi
|
||||
# replace login info
|
||||
sed -i "s/127.0.0.1;3306;acore;acore/localhost;3306;root;$MYSQL_ROOT_PASSWORD/" ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
|
||||
|
||||
if [[ $APP_NAME == "worldserver" ]]; then
|
||||
echo "DataDir = \"./data/\"" >> ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
|
||||
|
||||
sed -i 's/DataDir = \".\"/DataDir = \".\/data"/' ./env/dist/$CONFIG_FOLDER/$APP_NAME.conf
|
||||
git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git ./env/dist/$BIN_FOLDER/data
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user