3 Commits

Author SHA1 Message Date
Olia Lisa 0aeb2dedb8 chore: 优化脚本输出 2026-07-27 11:04:19 +08:00
Olia Lisa ec60a7bd20 fix: 打包iso镜像, 增加检查docker安装情况 2026-07-27 11:02:54 +08:00
Olia Lisa 5726119a1d feat: 增加颜色变量和函数 2026-07-27 10:59:53 +08:00
2 changed files with 31 additions and 1 deletions
+23
View File
@@ -1,5 +1,28 @@
#!/bin/bash
green="\033[32m"
blue="\033[36m"
yellow="\033[33m"
reset="\033[0m"
step() {
echo ""
echo -e "${blue}👉 $1${reset}"
sleep 0.5
}
success() {
echo -e "${green}$1${reset}"
}
skip() {
echo -e "${yellow}⏭️ $1${reset}"
}
info() {
echo -e "${blue}👉 $1${reset}"
}
# 安装 Image Builder 构建所需依赖
install_dependencies() {
sudo apt install -y build-essential libncurses-dev zlib1g-dev gawk git \
+8 -1
View File
@@ -7,6 +7,13 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd ${SCRIPT_DIR}
# 如果docker没有安装
if ! command -v docker &> /dev/null; then
curl -fsSL https://get.docker.com | bash # 使用官方脚本安装docker
success "Docker 安装完成"
fi
# 如果img-installer文件夹不存在, 下载img-installer
if [ ! -d "${SCRIPT_DIR}/img-installer" ]; then
git clone https://github.com/wukongdaily/img-installer.git
@@ -23,4 +30,4 @@ cd ${SCRIPT_DIR}/img-installer
bash autobuild/autobuild.sh "$INPUT_FILE"
mv ${SCRIPT_DIR}/img-installer/output/custom-installer-x86_64.iso ${PROJECT_OUTPUT_DIR}
echo ""
echo 构建 ISO 镜像成功
success 构建 ISO 镜像成功