This commit is contained in:
pvincent
2026-08-17 21:40:39 +04:00
parent a50b980efc
commit 29b3ff8b45
5 changed files with 33 additions and 25 deletions
+5 -1
View File
@@ -615,6 +615,10 @@ function usage {
echo "$(basename "$0") <SCRIPT> [...SCRIPT_ARGS] | --version | --help | --self-upgrade | --initiate | --uninstall"
}
function version {
cat "${MIAOU_BASH_DIR:-/opt/miaou-bash}/.semver_git_tag"
}
function parse_options {
HEREDOC=false
if [[ $# == 0 ]]; then
@@ -628,7 +632,7 @@ function parse_options {
elif [[ $# == 1 ]]; then
case "$1" in
--help) usage && builtin exit ;;
--version) cat "${MIAOU_BASH_DIR:-/opt/miaou-bash}/.semver_git_tag" && builtin exit ;;
--version) version && builtin exit ;;
--self-upgrade) self_upgrade && builtin exit ;;
--uninstall) uninstall && builtin exit ;;
-*) >&2 echo "ERROR: option '$1' unknown!" && usage && builtin exit 2 ;;