fix self-upgrade and uninstall

This commit is contained in:
pvincent
2026-08-21 10:59:32 +04:00
parent 8ad433f559
commit 7c851f9a1b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -637,8 +637,8 @@ function parse_options {
case "$1" in
--help) usage && builtin exit ;;
--version) version && builtin exit ;;
--self-upgrade) self_upgrade && builtin exit ;;
--uninstall) uninstall && builtin exit ;;
--self-upgrade) SCRIPT="$MIAOU_BASH_DIR"/lib/self-upgrade.bash && return ;;
--uninstall) SCRIPT="$MIAOU_BASH_DIR"/lib/uninstall.bash && return ;;
-*) >&2 echo "ERROR: option '$1' unknown!" && usage && builtin exit 2 ;;
esac
fi
+1 -1
View File
@@ -205,7 +205,7 @@ function link_miaou_bash {
function create_sudoers {
if [[ ! -f /etc/sudoers.d/miaou-bash ]]; then
echo 'Defaults:%sudo env_keep += "MIAOU_BASH_DIR"' | sudo tee /etc/sudoers.d/miaou-bash
echo 'Defaults:%sudo env_keep += "MIAOU_BASH_DIR"' | sudo tee /etc/sudoers.d/miaou-bash >/dev/null
sudo chmod 440 /etc/sudoers.d/miaou-bash
fi
}