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

## tools/run [ARGS...]

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

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

    wait
fi