mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-17 18:55:42 +00:00
refactor and compress code
This commit is contained in:
@@ -6,18 +6,14 @@ set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
COLOR_RED='\033[0;31m'
|
||||
COLOR_GREEN='\033[0;32m'
|
||||
COLOR_YELLOW='\033[1;33m'
|
||||
COLOR_BLUE='\033[0;34m'
|
||||
COLOR_CYAN='\033[0;36m'
|
||||
COLOR_RESET='\033[0m'
|
||||
# Source common library for standardized logging
|
||||
if ! source "$SCRIPT_DIR/lib/common.sh" 2>/dev/null; then
|
||||
echo "❌ FATAL: Cannot load $SCRIPT_DIR/lib/common.sh" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log(){ printf '%b\n' "${COLOR_GREEN}$*${COLOR_RESET}"; }
|
||||
info(){ printf '%b\n' "${COLOR_CYAN}$*${COLOR_RESET}"; }
|
||||
warn(){ printf '%b\n' "${COLOR_YELLOW}$*${COLOR_RESET}"; }
|
||||
err(){ printf '%b\n' "${COLOR_RED}$*${COLOR_RESET}"; }
|
||||
fatal(){ err "$*"; exit 1; }
|
||||
# Use log() instead of info() for main output to maintain existing behavior
|
||||
log() { ok "$*"; }
|
||||
|
||||
MYSQL_PW=""
|
||||
BACKUP_DIR=""
|
||||
|
||||
Reference in New Issue
Block a user