mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
20 lines
295 B
Bash
Executable File
20 lines
295 B
Bash
Executable File
#!/bin/bash
|
|
set -eu
|
|
trap 'kill $(jobs -p)' EXIT
|
|
|
|
DELAY=5
|
|
LOG=/tmp/electrs.log
|
|
CARGO="cargo +stable"
|
|
|
|
tail -v -n0 -F "$LOG" &
|
|
|
|
export RUST_BACKTRACE=1
|
|
while :
|
|
do
|
|
$CARGO fmt
|
|
$CARGO check --release
|
|
$CARGO run --release -- $* 2>> "$LOG"
|
|
echo "Restarting in $DELAY seconds..."
|
|
sleep $DELAY
|
|
done
|