1
1
Files
zyxel-vmg8825_b50b-cfw/build.sh
T
2026-04-17 20:18:52 +02:00

27 lines
772 B
Bash
Executable File

#!/bin/bash
set -e
IMAGE_NAME="zyxel-openwrt-builder"
CONTAINER_NAME="openwrt-builder-container"
FIRMWARE_PATH="/home/builder/openwrt/bin/brcm963xx/zyxel/ras.bin"
echo "Building Docker image ${IMAGE_NAME}..."
docker build -t ${IMAGE_NAME} .
echo "Starting container..."
docker run -it --name ${CONTAINER_NAME} \
-e TERM=vt100 \
${IMAGE_NAME} \
/bin/bash -c "cd /home/builder/openwrt && bash"
#TODO: copy config file to home
docker cp ${CONTAINER_NAME}:${FIRMWARE_PATH} ./ras.bin 2>/dev/null || {
echo "ERROR: Firmware not found at ${FIRMWARE_PATH}"
echo "The build may have failed or the output path is not ${FIRMWARE_PATH}"
echo "You can inspect the container manually: docker start -ai ${CONTAINER_NAME}"
exit 1
}
echo "Firmware copied to ./ras.bin"