mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
Persist stderr log with run.sh
This commit is contained in:
parent
016fc46018
commit
87b4df5747
@ -1,13 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
trap 'kill $(jobs -p)' EXIT
|
||||
|
||||
DELAY=5
|
||||
LOG=/tmp/electrs.log
|
||||
tail -v -n0 -F "$LOG" &
|
||||
|
||||
T=5
|
||||
export RUST_BACKTRACE=1
|
||||
while :
|
||||
do
|
||||
cargo fmt
|
||||
cargo check --release
|
||||
cargo run --release -- $*
|
||||
echo "Restarting in $T seconds..."
|
||||
sleep $T
|
||||
cargo run --release -- $* 2>> "$LOG"
|
||||
echo "Restarting in $DELAY seconds..."
|
||||
sleep $DELAY
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user