Unverified Commit 4b196aba authored by Aral Balkan's avatar Aral Balkan
Browse files

Update uninstall script to run on Linux

(The indent output function was not working.)
parent 488bba45
...@@ -23,7 +23,7 @@ uninstall(){ ...@@ -23,7 +23,7 @@ uninstall(){
echo -e " · Deleting all components.\n" echo -e " · Deleting all components.\n"
indentOutput "git clean -ffXd" git clean -ffXd | indent
echo -e "\n · Deleting all data and content." echo -e "\n · Deleting all data and content."
...@@ -33,13 +33,9 @@ uninstall(){ ...@@ -33,13 +33,9 @@ uninstall(){
echo -e " To re-install a fresh copy of Better, run the ./install script.\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) # Indents output by four spaces. Pipe to it.
indentOutput(){ # Courtesy https://stackoverflow.com/a/29779745
commandToRun=$1 indent() { sed 's/^/ /'; }
indentation=${2:-' '}
script -q /dev/null $1 | LC_ALL=C sed "s/^/${indentation} · /g"
}
secondConfirmation(){ secondConfirmation(){
echo -e "\n Are you really, really sure (last chance)?\n" echo -e "\n Are you really, really sure (last chance)?\n"
......
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