This commit is contained in:
bash
2024-08-12 19:38:48 +00:00
parent d6bd536d0f
commit e677c95d36
15 changed files with 94 additions and 0 deletions

40
scripts/2_source-update.sh Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
read -p "This will update the source code. Are you sure? (Y)es/(N)o: " -n 1 -r
echo " ";
if [[ $REPLY =~ ^[Yy]$ ]];
then
##########################################################################################
# General dependencies
##########################################################################################
sudo apt update && sudo apt install -y git
##########################################################################################
# reset azerothcore to latest branch
##########################################################################################
git -C ${ROOT_DIR}/_download/azerothcore fetch origin
git -C ${ROOT_DIR}/_download/azerothcore clean -fd
git -C ${ROOT_DIR}/_download/azerothcore reset --hard origin/Playerbot
##########################################################################################
# reset mod-playerbots to latest branch
##########################################################################################
git -C ${ROOT_DIR}/_download/modules/mod-playerbots fetch origin
git -C ${ROOT_DIR}/_download/modules/mod-playerbots clean -fd
git -C ${ROOT_DIR}/_download/modules/mod-playerbots reset --hard origin/master
##########################################################################################
# reset mod-ah-bot to latest branch
##########################################################################################
git -C ${ROOT_DIR}/_download/modules/mod-ah-bot fetch origin
git -C ${ROOT_DIR}/_download/modules/mod-ah-bot clean -fd
git -C ${ROOT_DIR}/_download/modules/mod-ah-bot reset --hard origin/master
echo "Executed..."
fi