Skip to content

Instantly share code, notes, and snippets.

@wbmins
wbmins / build_openwrt.sh
Last active April 25, 2026 00:37
openwrt-x86_64自定镜像构建脚本,默认包含包(luci zoneinfo-asia lsd curl openssh-sftp-server vim luci-i18n-base-zh-cn luci-app-firewall luci-i18n-firewall-zh-cn luci-i18n-package-manager-zh-cn luci-i18n-momo-zh-cn)
#!/bin/bash
# 如果出错则停止运行
set -e
# --- 1. 变量配置区 ---
VERSION="${1:-25.12.0-rc4}"
# 自动提取前两位作为 Prefix (例如 25.12)
PREFIX=$(echo $VERSION | cut -d. -f1-2)
ARCH="x86-64"