This commit is contained in:
pvincent
2026-08-10 19:01:57 +04:00
parent 4ab03abf15
commit c883c0c36c
4 changed files with 42 additions and 21 deletions
+15 -6
View File
@@ -1,13 +1,10 @@
#!/usr/bin/env miaou-bash
# MAIN
[[ "$UID" -ne 0 ]] && echo 'root privilege required' && exit 1
# Constants
cd || exit
# Functions
source "$MIAOU_BASH_DIR"/lib/functions.bash
if _confirm_destructive; then
function uninstall {
if [[ -f /etc/bash.bashrc.ORIGINAL ]]; then
rm /etc/bash.bashrc
mv /etc/bash.bashrc.ORIGINAL /etc/bash.bashrc
@@ -23,4 +20,16 @@ if _confirm_destructive; then
unset MIAOU_BASH_DIR
echo 'MIAOU-BASH fully uninstalled, restored from original'
}
# Main
source "$MIAOU_BASH_DIR"/lib/functions.bash
assert_system_mode
assert_root
cd || exit
if _confirm_destructive; then
uninstall
else
>&2 echo canceled && builtin exit 1
fi