improve build scripts

- use shebang
- use pushd/popd
- add npm install to initialize node project dependencies
This commit is contained in:
2025-10-18 18:40:27 +02:00
parent 70df806a87
commit 658efd30bb
3 changed files with 18 additions and 6 deletions

View File

@@ -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