Skip to content

Instantly share code, notes, and snippets.

@otrho
Created November 23, 2022 00:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otrho/d42757376c30ee5806f144e2c7a8e06b to your computer and use it in GitHub Desktop.
Save otrho/d42757376c30ee5806f144e2c7a8e06b to your computer and use it in GitHub Desktop.
Script to (re)run `fuel-core`.
#!/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