A2A/scripts/sort_spelling.sh
Holt Skinner 64f1064598
chore: Organize Scripts into top level folder (#1015)
Add `format.sh` and `sort_spelling.sh` scripts
2025-08-28 18:20:17 +01:00

17 lines
480 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Determine the repository root directory based on the script's location.
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
REPO_ROOT=$(cd -- "$SCRIPT_DIR/.." &>/dev/null && pwd)
ALLOW_FILE="${REPO_ROOT}/.github/actions/spelling/allow.txt"
echo "Sorting spelling allow list..."
[ -f "${ALLOW_FILE}" ] || {
echo "ERROR: Allow list not found: ${ALLOW_FILE}"
exit 1
}
LC_ALL=C sort -u -o "${ALLOW_FILE}" "${ALLOW_FILE}"