From 9eb3aad357ff69930cc16fc184e8a014cf8a52c3 Mon Sep 17 00:00:00 2001 From: tadeubas Date: Fri, 16 Feb 2024 18:48:32 -0300 Subject: [PATCH] Fix build error when files with Windows line ending CRLF (\r\n) --- Dockerfile | 1 + krux | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4f7527a7f..8fe50301a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,4 +110,5 @@ FROM build-firmware AS build ARG DEVICE="maixpy_m5stickv" WORKDIR /src/firmware/Kboot/build RUN cp /src/firmware/MaixPy/projects/"${DEVICE}"/build/firmware.bin . +RUN sed -i -e 's/\r$//' *.sh RUN ./CLEAN.sh && ./BUILD.sh diff --git a/krux b/krux index 6ddbb70a8..ed83bfd66 100755 --- a/krux +++ b/krux @@ -55,7 +55,7 @@ if [ "$1" == "build" ]; then if [ -z "$device" ]; then echo "Missing device" else - declare $(grep -m 1 version pyproject.toml | sed 's/ *= */=/g' | sed 's/"//g') + declare $(grep -m 1 version pyproject.toml | sed 's/ *= */=/g' | sed 's/"//g' | sed 's/\r//g') sed -i -- 's/VERSION = ".*"/VERSION = "'"$version"'"/g' src/krux/metadata.py mkdir -p build