examples: add option --interactive|-i

This commit is contained in:
Erik Arvstedt
2020-10-18 13:41:55 +02:00
parent 33ff8d82be
commit c19f7ebb01
5 changed files with 33 additions and 16 deletions

View File

@@ -14,7 +14,7 @@ set -euo pipefail
if [[ ! -v IN_NIX_SHELL ]]; then
echo "Running script in nix shell env..."
cd "${BASH_SOURCE[0]%/*}"
exec nix-shell --run "./${BASH_SOURCE[0]##*/}"
exec nix-shell --run "./${BASH_SOURCE[0]##*/} $*"
fi
tmpDir=/tmp/nix-bitcoin-qemu-vm
@@ -91,7 +91,10 @@ echo
echo "Node info:"
c nodeinfo
# Uncomment to start a shell session here
# . start-bash-session.sh
case ${1:-} in
-i|--interactive)
. start-bash-session.sh
;;
esac
# Cleanup happens at exit (see above)