feat: add Linux/Unix scripts and Makefile entry
This commit is contained in:
@@ -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" "$@"
|
||||
Reference in New Issue
Block a user