Files
azerothcore_installer/script/2_source-update.sh
2025-09-20 21:59:40 +02:00

41 lines
2.0 KiB
Bash
Executable File

#!/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
##########################################################################################
# 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/${AC_WOTLK_REPO_BRANCH}
##########################################################################################
# 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/${AC_MODE_PLAYER_BOTS_REPO_BRANCH}
##########################################################################################
# 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/${AC_MODE_AHBOT_REPO_BRANCH}
##########################################################################################
# resetmod-player-bot-level-brackets to latest branch
##########################################################################################
git -C ${ROOT_DIR}/_download/modules/mod-player-bot-level-brackets fetch origin
git -C ${ROOT_DIR}/_download/modules/mod-player-bot-level-brackets clean -fd
git -C ${ROOT_DIR}/_download/modules/mod-player-bot-level-brackets reset --hard origin/${AC_MODE_BRACKETS_REPO_BRANCH}
echo "Executed..."
fi