initial setup after some tweaking

This commit is contained in:
bash
2024-07-22 23:26:52 +00:00
parent 1f10fe58e0
commit 12425e05fa
23 changed files with 784 additions and 2 deletions

62
4_compile.sh Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/bash
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
source ${ROOT_DIR}/variables.sh
read -p "This will (re)compile server, are you sure? (Y)es/(N)o: " -n 1 -r
echo " ";
if [[ $REPLY =~ ^[Yy]$ ]];
then
##########################################################################################
# General dependencies
##########################################################################################
sudo apt update && \
sudo apt full-upgrade -y && \
sudo apt-get install -y \
btop \
tmux \
sudo \
curl \
net-tools \
locate \
nano \
software-properties-common
##########################################################################################
# Install core dependencies (https://www.azerothcore.org/wiki/linux-requirements)
##########################################################################################
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh install-deps && \
sudo apt-get update && \
sudo apt-get install \
git \
cmake \
make \
gcc \
g++ \
clang \
libmysqlclient-dev \
libssl-dev \
libbz2-dev libreadline-dev \
libncurses-dev mysql-server \
libboost-all-dev
##########################################################################################
# Compile the code
# https://github.com/azerothcore/azerothcore-wotlk/blob/master/apps/compiler/compiler.sh
##########################################################################################
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler clean
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler configure
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler compile
##########################################################################################
# Ensure all folder and files are accesible for the current user
##########################################################################################
sudo find ${ROOT_DIR}/_server/ -user root -exec sudo chown $USER: {} +
echo "Executed..."
fi