Ind.ie is now Small Technology Foundation.
Commit 488bba45 authored by Aral Balkan's avatar Aral Balkan

Update to work on Linux

  * Specify bash shell
  * Add -e option to echo statements
parent c1f74632
#!/bin/sh
#!/bin/bash
set -e
......@@ -19,18 +19,18 @@ set -e
################################################################################
uninstall(){
echo "\n Uninstalling Better and all its data and contents.\n"
echo -e "\n Uninstalling Better and all its data and contents.\n"
echo " · Deleting all components.\n"
echo -e " · Deleting all components.\n"
indentOutput "git clean -ffXd"
echo "\n · Deleting all data and content."
echo -e "\n · 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"
echo -e "\n Uninstallation complete.\n"
echo -e " To re-install a fresh copy of Better, run the ./install script.\n"
}
# Runs the passed command, formatting the output with the passed indentation (default: 4 spaces)
......@@ -42,45 +42,45 @@ indentOutput(){
}
secondConfirmation(){
echo "\n Are you really, really sure (last chance)?\n"
echo -e "\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;;
No ) echo -e "\n Whew, that was close!\n\n Uninstall aborted.\n"; exit;;
*) echo -e "\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"
echo -e ""
echo -e " ____ _ _ ";
echo -e " | _ \ | | | | ";
echo -e " | |_) | ___| |_| |_ ___ _ __ ";
echo -e " | _ < / _ \ __| __/ _ \ '__|";
echo -e " | |_) | __/ |_| || __/ | ";
echo -e " |____/ \___|\__|\__\___|_| ";
echo -e ""
echo -e " ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ";
echo -e " ░ ░ ";
echo -e " ░ (!) UNINSTALLER ░ ";
echo -e " ░ ░ ";
echo -e " ░ This will uninstall all components, data, *and* contents under ~/better.fyi. ░ ";
echo -e " ░ ░ ";
echo -e " ░ (It will delete all content, themes, drafts, your HTTP archive, etc.) ░ ";
echo -e " ░ ░ ";
echo -e " ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ";
echo -e ""
echo -e " 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;;
No ) echo -e "\n Uninstall aborted.\n"; exit;;
*) echo -e "\n Please enter 1 for Yes and 2 for No.";continue;;
esac
done
}
......
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