summaryrefslogtreecommitdiff
path: root/tools/run
blob: 562a94d0b0ced2f4d62904ca4fd979143fe35bd2 (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 & PIDS[0]=$!
    cargo run -- "$@" & PIDS[1]=$!

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

    wait
fi