Commit d6020738 authored by Aral Balkan's avatar Aral Balkan

Added uninstall script.

parent b59df525
Pipeline #399 skipped
......@@ -7,3 +7,4 @@
!.gitignore
!readme.md
!install
!uninstall
\ No newline at end of file
#!/bin/sh
set -e
################################################################################
#
# Better Uninstaller.
#
# Removes installed components *and content/data*.
#
# This is Independent Technology.
#
# ▲❤ We practice Ethical Design (https://ind.ie/ethical-design)
#
# © Aral Balkan. © Ind.ie. All Rights Reserved.
# Released with love by Ind.ie under GNU AGPLv3 or later.
# Free as in freedom. Please see the LICENSE file.
#
################################################################################
uninstall(){
echo "\n Uninstalling Better and all its data and contents.\n"
echo " · Deleting all components."
git clean -ffXd
echo " · Deleting all data and content."
rm -rf ~/better.fyi
echo "\n Uninstallation complete.\n"
echo " To re-install a fresh copy of Better, run the ./install script.\n"
}
secondConfirmation(){
echo "\n Are you really, really sure (last chance)?\n"
select yn in "Yes" "No"; do
case $yn in
Yes ) uninstall; break;;
No ) echo "\n Whew, that was close!\n\n Uninstall aborted.\n"; exit;;
*) echo "\n Please enter 1 for Yes and 2 for No.";continue;;
esac
done
}
greeting(){
echo ""
echo " ____ _ _ ";
echo " | _ \ | | | | ";
echo " | |_) | ___| |_| |_ ___ _ __ ";
echo " | _ < / _ \ __| __/ _ \ '__|";
echo " | |_) | __/ |_| || __/ | ";
echo " |____/ \___|\__|\__\___|_| ";
echo ""
echo " ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ";
echo " ░ ░ ";
echo " ░ (!) UNINSTALLER ░ ";
echo " ░ ░ ";
echo " ░ This will uninstall all components, data, *and* contents under ~/better.fyi. ░ ";
echo " ░ ░ ";
echo " ░ (It will delete all content, themes, drafts, your HTTP archive, etc.) ░ ";
echo " ░ ░ ";
echo " ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ";
echo ""
echo " Are you sure you want to delete everything?\n"
PS3="
> "
select yn in "Yes" "No"; do
case $yn in
Yes ) secondConfirmation; break;;
No ) echo "\n Uninstall aborted.\n"; exit;;
*) echo "\n Please enter 1 for Yes and 2 for No.";continue;;
esac
done
}
greeting
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment