mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
28 lines
594 B
Bash
Executable File
28 lines
594 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
HOOK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "$HOOK_DIR/.." && pwd)"
|
|
|
|
cd "$REPO_ROOT"
|
|
|
|
if [[ -z "${POEDITOR_API_TOKEN:-}" ]] || [[ -z "${POEDITOR_PROJECT_ID:-}" ]]; then
|
|
echo "Skipping i18n sync check (POEDITOR_API_TOKEN or POEDITOR_PROJECT_ID not set)"
|
|
exit 0
|
|
fi
|
|
|
|
if ! command -v python3 &>/dev/null; then
|
|
echo "Warning: python3 not found, skipping i18n check"
|
|
exit 0
|
|
fi
|
|
|
|
if ! python3 scripts/i18nsync.py check 2>&1; then
|
|
echo ""
|
|
echo "Run: python3 scripts/i18nsync.py sync"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|