about summary refs log tree commit diff
path: root/dev.sh
blob: a2b2c8ed3871829c25ba5287984284cbff432749 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

if [[ "$1" == "watch" ]]; then
	shift
	exec systemfd --no-pid -s http::8080 -- cargo watch \
         --ignore '.direnv' \
         --ignore '*~' \
         -L "$KITTYBOX_LOG" \
         -x run \
         "$@"
elif [[ "$1" == "run" ]]; then
	shift 1
    export RUST_LOG="$KITTYBOX_LOG"
	exec cargo run "$@"
elif [[ "$1" == "_run" ]]; then
	shift 1
	release=$1
	shift 1
	exec target/${release}/kittybox "$@"
else
	echo "Usage: ./dev.sh [watch|run]"
	exit 1
fi