fix: 如果找不到files文件夹, 跳过复制
This commit is contained in:
@@ -129,7 +129,13 @@ build(){
|
||||
cd "$BUILDER_DIR"
|
||||
|
||||
mkdir -p "$FILES_DIR"
|
||||
cp "${SCRIPT_DIR}"/files/* "$BUILDER_DIR/files/" -rf
|
||||
# 复制 files 目录下的自定义文件到 Image Builder 的 files 目录
|
||||
if [ -d "${SCRIPT_DIR}/files" ]; then
|
||||
echo -e "${YELLOW}[提示] 复制自定义 files/ 目录到 Image Builder${NC}"
|
||||
cp ${SCRIPT_DIR}/files/* $BUILDER_DIR/files/ -rf
|
||||
else
|
||||
echo -e "${YELLOW}[提示] 未找到自定义 files/ 目录,跳过复制${NC}"
|
||||
fi
|
||||
|
||||
# 禁用 x86 Image Builder 中常见的额外镜像格式;rockchip 目标不存在时会自动跳过
|
||||
sed -i \
|
||||
|
||||
@@ -136,7 +136,12 @@ build(){
|
||||
cd "$BUILDER_DIR"
|
||||
|
||||
# 复制 files 目录下的自定义文件到 Image Builder 的 files 目录
|
||||
cp ${SCRIPT_DIR}/files/* $BUILDER_DIR/files/ -rf
|
||||
if [ -d "${SCRIPT_DIR}/files" ]; then
|
||||
echo -e "${YELLOW}[提示] 复制自定义 files/ 目录到 Image Builder${NC}"
|
||||
cp ${SCRIPT_DIR}/files/* $BUILDER_DIR/files/ -rf
|
||||
else
|
||||
echo -e "${YELLOW}[提示] 未找到自定义 files/ 目录,跳过复制${NC}"
|
||||
fi
|
||||
|
||||
# 修改.config文件, 不构建以下格式固件
|
||||
sed -i \
|
||||
|
||||
Reference in New Issue
Block a user