mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-08 05:03:49 -05:00
25 lines
364 B
Bash
Executable File
25 lines
364 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Exit on error
|
|
set -e
|
|
|
|
# This is kind of like a shim that makes sure the frontend is rebuilt when running a build. For example you can run `./build.sh cargo build --release`
|
|
|
|
# Remove old files
|
|
rm -rf src/static
|
|
|
|
# Frontend
|
|
cd web/
|
|
|
|
# Build
|
|
bun run build
|
|
|
|
# Copy UI to src folder
|
|
cp -r dist/ ../src/static
|
|
|
|
# Go back
|
|
cd ../
|
|
|
|
# Run command from argv
|
|
|
|
$@ |