destroy 524 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. #this script nukes your blog locally, so it requires confirmation
  3. yn=""
  4. while true; do
  5. echo "WARNING: You will lost your blog files! There's no undo for this action."
  6. echo "Are you sure you want to delete your local blog files? (y/n)"
  7. read -r yn
  8. case $yn in
  9. [Yy]* ) rm -rf entries/ public_html/
  10. rm -f nci.conf
  11. rm -f user.conf
  12. rm -f exclude.conf
  13. echo "Blog successfully deleted. F."
  14. exit 1
  15. ;;
  16. [Nn]* ) echo "You're safe now."
  17. exit 1
  18. ;;
  19. * ) echo "Error: Please answer just y/n.";;
  20. esac
  21. done