Created
November 23, 2022 00:49
-
-
Save otrho/d42757376c30ee5806f144e2c7a8e06b to your computer and use it in GitHub Desktop.
Script to (re)run `fuel-core`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
killall fuel-core | |
while true ; do | |
cargo r -- run --db-type in-memory & | |
sleep 1 | |
read -p "(r)estart or (q)uit: " input | |
killall fuel-core | |
sleep 1 | |
while true ; do | |
case "${input}" in | |
"q"|"quit") | |
exit | |
;; | |
"r"|"restart") | |
break | |
;; | |
*) | |
echo "Invalid input: ${input}" | |
read -p "(r)estart or (q)uit: " input | |
;; | |
esac | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment