tildelog/lib/reset.sh

17 lines
548 B
Bash

#!/usr/bin/env bash
# Delete all generated content, leaving only this script
reset() {
echo "Are you sure you want to delete all blog entries? Please write \"Yes, I am!\" "
read -r line
if [[ $line == "Yes, I am!" ]]; then
rm .*.html ./*.html ./*.css ./*.rss &>/dev/null
echo
echo "Deleted all posts, stylesheets and feeds."
echo "Kept your old '.backup.tar.gz' just in case, please delete it manually if needed."
else
echo "Phew! You dodged a bullet there. Nothing was modified."
fi
}