summaryrefslogtreecommitdiff
path: root/tools/run
blob: ac42e93b3322df097c7a5b61d1507b01e8090a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e

## tools/run [ARGS...]

if [ -z ${HI_DEV+x} ]; then
    tools/build-ui
    cargo run -- "$@"
else
    npm run dev -- --host 192.168.68.57 & PIDS[0]=$!
    cargo run -- "$@" & PIDS[1]=$!

    trap "kill ${PIDS[*]}" SIGINT

    wait
fi