small fix

This commit is contained in:
pvincent
2026-08-07 23:08:54 +04:00
parent 8958a37ffc
commit a64c63680a
3 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ miaou-bash --self-upgrade
## uninstall ## uninstall
```bash ```bash
TODO: miaou-bash --uninstall miaou-bash --uninstall
``` ```
+9 -7
View File
@@ -613,13 +613,15 @@ function usage {
function parse_options { function parse_options {
[[ $# == 0 ]] && >&2 echo 'ERROR: script expected!' && builtin exit 2 [[ $# == 0 ]] && >&2 echo 'ERROR: script expected!' && builtin exit 2
[[ $# == 1 ]] && case "$1" in if [[ $# == 1 ]]; then
--help) usage && builtin exit ;; case "$1" in
--version) cat "${MIAOU_BASH_DIR:-/opt/miaou-bash}/.semver_git_tag" && builtin exit ;; --help) usage && builtin exit ;;
--self-upgrade) self_upgrade && builtin exit ;; --version) cat "${MIAOU_BASH_DIR:-/opt/miaou-bash}/.semver_git_tag" && builtin exit ;;
--uninstall) uninstall && builtin exit ;; --self-upgrade) self_upgrade && builtin exit ;;
-*) >&2 echo "ERROR: option '$1' unknown!" && usage && builtin exit 2 ;; --uninstall) uninstall && builtin exit ;;
esac -*) >&2 echo "ERROR: option '$1' unknown!" && usage && builtin exit 2 ;;
esac
fi
[[ $1 =~ ^- ]] && >&2 echo "ERROR: too many args $#, either single option or SCRIPT + args accepted!" && builtin exit 2 [[ $1 =~ ^- ]] && >&2 echo "ERROR: too many args $#, either single option or SCRIPT + args accepted!" && builtin exit 2
SCRIPT="$1" SCRIPT="$1"
[[ ! -v SCRIPT ]] && >&2 echo 'ERROR: script expected!' && builtin exit 2 [[ ! -v SCRIPT ]] && >&2 echo 'ERROR: script expected!' && builtin exit 2
+4
View File
@@ -5,6 +5,10 @@
cd || exit cd || exit
source "$MIAOU_BASH_DIR"/lib/functions.bash
_confirm_destructive
if [[ -f /etc/bash.bashrc.ORIGINAL ]]; then if [[ -f /etc/bash.bashrc.ORIGINAL ]]; then
rm /etc/bash.bashrc rm /etc/bash.bashrc
mv /etc/bash.bashrc.ORIGINAL /etc/bash.bashrc mv /etc/bash.bashrc.ORIGINAL /etc/bash.bashrc