- use shebang - use pushd/popd - add npm install to initialize node project dependencies
18 lines
449 B
Bash
Executable File
18 lines
449 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
rm image.bin
|
|
rm ./src/webserver/index.html.gz
|
|
rm ./src/webserver/bundle.js.gz
|
|
set -e
|
|
|
|
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
|
|
popd
|
|
|
|
set -e
|
|
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
|