Skip to content

Instantly share code, notes, and snippets.

@gordonpn
Created May 17, 2021 03:01
Show Gist options
  • Save gordonpn/9d8e51bdd9373df67b5e2535356f5dd2 to your computer and use it in GitHub Desktop.
Save gordonpn/9d8e51bdd9373df67b5e2535356f5dd2 to your computer and use it in GitHub Desktop.
# Making sure variables are set
if [ -z "${APP_NAME}" ] || [ -z "${MODULE_NAME}" ]; then
echo "You must supply both an app and module name, example: ${0} myapp MyApp"
exit 1
fi
# Yes / No prompt
while true; do
read -p "Run docker-compose down -v (y/n)? " -r yn
case "${yn}" in
[Yy]* ) docker-compose down -v; break;;
[Nn]* ) exit;;
* ) echo "";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment