feat: add Linux/Unix scripts and Makefile entry

This commit is contained in:
FlipWind
2026-08-09 00:12:13 +08:00
parent cd19dddad1
commit b57726f434
6 changed files with 409 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/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" "$@"