about summary refs log blame commit diff
path: root/dev.sh
blob: a2b2c8ed3871829c25ba5287984284cbff432749 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
         
 
                              

                                                             
                             
                 
                              
                                   
                           



                                            


                                          
#!/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