Files
sfcraft-docs/scripts/sync-items.sh
T

19 lines
453 B
Bash

#!/usr/bin/env bash
# SFCraft 文档 · 物品贴图自动同步 (Linux / macOS / Unix)
# 用法: ./scripts/sync-items.sh [-f]
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PY=""
if command -v python3 >/dev/null 2>&1; then
PY="python3"
elif command -v python >/dev/null 2>&1; then
PY="python"
else
echo "[错误] 未找到 python3 / python, 请先安装 Python 3。" >&2
exit 1
fi
exec "$PY" "$DIR/sync-items.py" "$@"