yoake/scripts/dev.fish

16 lines
415 B
Fish
Raw Normal View History

2023-06-18 18:17:28 -05:00
#!/usr/bin/env fish
echo "Starting Server..."
trap "echo 'Stopping Server...'; kill (cat .server_pid) && rm .server_pid; exit 0" SIGINT SIGTERM
while true
if [ -f .server_pid ]
kill (cat .server_pid)
end
cargo run --bin yoake_server -- -c config-dev.yaml & echo $last_pid > .server_pid
inotifywait -e modify -e move -e create -e delete -r src \
&& kill (cat .server_pid)
end