diff --git a/Software/MainBoard/rust/all.sh b/Software/MainBoard/rust/all.sh index 7f046eb..5a80cfb 100755 --- a/Software/MainBoard/rust/all.sh +++ b/Software/MainBoard/rust/all.sh @@ -1,11 +1,15 @@ +#!/usr/bin/env bash + rm ./src/webserver/index.html.gz rm ./src/webserver/bundle.js.gz set -e -cd ./src_webpack/ + +pushd ./src_webpack/ +npm install npx webpack build cp index.html.gz ../src/webserver/index.html.gz cp bundle.js.gz ../src/webserver/bundle.js.gz -cd ../ +popd cargo build --release espflash save-image --bootloader bootloader.bin --partition-table partitions.csv --chip esp32c6 target/riscv32imac-unknown-none-elf/release/plant-ctrl2 image.bin diff --git a/Software/MainBoard/rust/flash.sh b/Software/MainBoard/rust/flash.sh index 07ff4fb..8dff1d5 100755 --- a/Software/MainBoard/rust/flash.sh +++ b/Software/MainBoard/rust/flash.sh @@ -1,11 +1,15 @@ +#!/usr/bin/env bash + rm ./src/webserver/index.html.gz rm ./src/webserver/bundle.js.gz set -e -cd ./src_webpack/ + +pushd ./src_webpack/ +npm install npx webpack build cp index.html.gz ../src/webserver/index.html.gz cp bundle.js.gz ../src/webserver/bundle.js.gz -cd ../ +popd cargo build --release espflash flash --monitor --bootloader bootloader.bin --chip esp32c6 --baud 921600 --partition-table partitions.csv target/riscv32imac-unknown-none-elf/release/plant-ctrl2 diff --git a/Software/MainBoard/rust/image_build.sh b/Software/MainBoard/rust/image_build.sh index 4dc9a11..5685130 100755 --- a/Software/MainBoard/rust/image_build.sh +++ b/Software/MainBoard/rust/image_build.sh @@ -1,12 +1,16 @@ +#!/usr/bin/env bash + rm image.bin rm ./src/webserver/index.html.gz rm ./src/webserver/bundle.js.gz set -e -cd ./src_webpack/ + +pushd ./src_webpack/ +npm install npx webpack build cp index.html.gz ../src/webserver/index.html.gz cp bundle.js.gz ../src/webserver/bundle.js.gz -cd ../ +popd set -e cargo build --release