Created
August 24, 2020 12:07
-
-
Save codepope/76fcc0ced574dbe2e225cb99624f2c0f to your computer and use it in GitHub Desktop.
Finds a Fly app name in the local directory's fly.toml and destroys without mercy
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
#!/bin/bash | |
regex='^app = "([^"]*)"' | |
while read line | |
do | |
if [[ $line =~ $regex ]] | |
then | |
appname="${BASH_REMATCH[1]}" | |
flyctl destroy $appname -y | |
exit | |
fi | |
done < fly.toml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment