From 1b7ccbe043a09d92376daffdbf4f850321f73c9f Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Fri, 12 Jul 2024 18:05:56 -0400 Subject: [PATCH] Update deploy.devnet.sh --- examples/morpheusvm/scripts/deploy.devnet.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/morpheusvm/scripts/deploy.devnet.sh b/examples/morpheusvm/scripts/deploy.devnet.sh index d51d748f4a..9466306698 100755 --- a/examples/morpheusvm/scripts/deploy.devnet.sh +++ b/examples/morpheusvm/scripts/deploy.devnet.sh @@ -174,11 +174,15 @@ EOF # Setup devnet CLUSTER="vryx-$(date +%s)" +interrupted=false function showcleanup { - echo -e "\n\n${RED}run this command to destroy the devnet:${NC} ${TMPDIR}/avalanche node destroy ${CLUSTER}\n" + if [ "$interrupted" = false ]; then + echo -e "\n\n${RED}run this command to destroy the devnet:${NC} ${TMPDIR}/avalanche node destroy ${CLUSTER}\n" + fi } function cleanup { + interrupted=true echo -e "\n\n${RED}destroying the devnet, running:${NC} ${TMPDIR}/avalanche node destroy ${CLUSTER}\n" ${TMPDIR}/avalanche node destroy ${CLUSTER} -y }