Files
florian.berthold 94f6f55fb6 Add installation script and enhance addon functionality
- Introduced `install_addon_sub.sh` to automate addon installation.
- Improved argument normalization with a new `Norm` helper function.
- Added debug command for enhanced diagnostics and collector status visibility.
- Ensured global addon table initialization for flexible load order.
- Marked modules as loaded for better debug tracking.
- Fixed TOC path formatting for Windows compatibility.
- Updated `.gitignore` rules for IDE folders.
2025-12-08 15:25:07 +01:00

40 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Installs/syncs the AscensionExporter addon into your WoW Ascension AddOns folder.
# Default target: /srv/add01/wow-ascension/Interface/AddOns
# Usage:
# scripts/install_addon_sub.sh [TARGET_ADDONS_DIR]
# Example:
# scripts/install_addon_sub.sh /srv/add01/wow-ascension/Interface/AddOns
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="${SCRIPT_DIR}/.."
SRC="${REPO_ROOT}/AscensionExporter"
DEST_BASE="${1:-/srv/add01/wow-ascension/Interface/AddOns}"
DEST="${DEST_BASE}/AscensionExporter"
if [[ ! -d "${SRC}" ]]; then
echo "ERROR: Source addon folder not found at: ${SRC}" >&2
exit 1
fi
echo "Installing AscensionExporter from: ${SRC}"
echo "Target AddOns directory: ${DEST_BASE}"
mkdir -p "${DEST_BASE}"
if command -v rsync >/dev/null 2>&1; then
echo "Using rsync to copy files..."
rsync -a --delete "${SRC}/" "${DEST}/"
else
echo "rsync not found; using cp -a"
mkdir -p "${DEST}"
# Copy contents of SRC into DEST, preserving attributes
cp -a "${SRC}/." "${DEST}/"
fi
echo "Done. Addon installed to: ${DEST}"
echo "If needed, enable it on the character select screen and type /reload in-game."