部署时通过 install.sh 自动编译 marknb;日常更新用 upgrade.sh 拉代码并重编译。 Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
532 B
Bash
Executable File
22 lines
532 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 一键安装 py-blog 依赖:编译 marknb 动态库 + Python venv
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
# shellcheck source=common.sh
|
|
source "$ROOT/scripts/common.sh"
|
|
|
|
echo "==> 安装系统构建依赖(如有 apt)"
|
|
apt_install
|
|
|
|
echo "==> 拉取并编译 marknb → $LIB_PATH"
|
|
build_marknb
|
|
|
|
echo "==> 安装 Python 依赖到 venv"
|
|
install_python
|
|
|
|
echo ""
|
|
echo "安装完成。"
|
|
echo " marknb: $LIB_PATH"
|
|
echo " 启动: source venv/bin/activate && python blog.py"
|