Update uninstall script to run on Linux

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