small fix
This commit is contained in:
@@ -43,7 +43,7 @@ miaou-bash --self-upgrade
|
||||
## uninstall
|
||||
|
||||
```bash
|
||||
TODO: miaou-bash --uninstall
|
||||
miaou-bash --uninstall
|
||||
|
||||
```
|
||||
|
||||
|
||||
+9
-7
@@ -613,13 +613,15 @@ function usage {
|
||||
|
||||
function parse_options {
|
||||
[[ $# == 0 ]] && >&2 echo 'ERROR: script expected!' && builtin exit 2
|
||||
[[ $# == 1 ]] && case "$1" in
|
||||
--help) usage && builtin exit ;;
|
||||
--version) cat "${MIAOU_BASH_DIR:-/opt/miaou-bash}/.semver_git_tag" && builtin exit ;;
|
||||
--self-upgrade) self_upgrade && builtin exit ;;
|
||||
--uninstall) uninstall && builtin exit ;;
|
||||
-*) >&2 echo "ERROR: option '$1' unknown!" && usage && builtin exit 2 ;;
|
||||
esac
|
||||
if [[ $# == 1 ]]; then
|
||||
case "$1" in
|
||||
--help) usage && builtin exit ;;
|
||||
--version) cat "${MIAOU_BASH_DIR:-/opt/miaou-bash}/.semver_git_tag" && builtin exit ;;
|
||||
--self-upgrade) self_upgrade && builtin exit ;;
|
||||
--uninstall) uninstall && builtin exit ;;
|
||||
-*) >&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
|
||||
SCRIPT="$1"
|
||||
[[ ! -v SCRIPT ]] && >&2 echo 'ERROR: script expected!' && builtin exit 2
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
cd || exit
|
||||
|
||||
source "$MIAOU_BASH_DIR"/lib/functions.bash
|
||||
|
||||
_confirm_destructive
|
||||
|
||||
if [[ -f /etc/bash.bashrc.ORIGINAL ]]; then
|
||||
rm /etc/bash.bashrc
|
||||
mv /etc/bash.bashrc.ORIGINAL /etc/bash.bashrc
|
||||
|
||||
Reference in New Issue
Block a user