miaou-bash --doctor

This commit is contained in:
pvincent
2026-09-01 13:53:45 +04:00
parent f135c60fa6
commit 48e3e11695
4 changed files with 60 additions and 2 deletions
+2 -1
View File
@@ -585,7 +585,7 @@ function cleanup {
}
function usage {
echo "$(basename "$0") <SCRIPT> [...SCRIPT_ARGS] | --help | --self-upgrade | --uninstall | --version"
echo "$(basename "$0") <SCRIPT> [...SCRIPT_ARGS] | --doctor | --help | --self-upgrade | --uninstall | --version"
}
function version {
@@ -610,6 +610,7 @@ function parse_options {
case "$1" in
--help) usage && builtin exit ;;
--version) version && builtin exit ;;
--doctor) SCRIPT="$MIAOU_BASH_DIR"/lib/doctor.bash && return ;;
--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 ;;