You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
770 B
35 lines
770 B
#!/usr/bin/env miaou-bash
|
|
|
|
# Constants
|
|
|
|
# Functions
|
|
|
|
function uninstall {
|
|
if [[ -f /etc/bash.bashrc.ORIGINAL ]]; then
|
|
sudo rm /etc/bash.bashrc
|
|
sudo mv /etc/bash.bashrc.ORIGINAL /etc/bash.bashrc
|
|
fi
|
|
|
|
if [[ -f /etc/inputrc.ORIGINAL ]]; then
|
|
sudo rm /etc/inputrc
|
|
sudo mv /etc/inputrc.ORIGINAL /etc/inputrc
|
|
fi
|
|
|
|
sudo rm /etc/profile.d/20-miaou-bash.sh
|
|
sudo rm -f /etc/vimrc/vimrc.{azerty,core,local,miaou,rookie}
|
|
sudo rm -rf /opt/miaou-bash
|
|
}
|
|
|
|
# Main
|
|
|
|
source "$MIAOU_BASH_DIR"/lib/functions.bash
|
|
assert_system_mode
|
|
sudo_root
|
|
if _confirm_destructive 2>/dev/null; then
|
|
cd || exit 2 # exit should not occur!
|
|
uninstall
|
|
source /etc/profile
|
|
echo 'MIAOU-BASH fully uninstalled, previous settings restored from original'
|
|
else
|
|
builtin exit 1
|
|
fi
|