devmode
This commit is contained in:
+15
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user