Add self-update command to refresh miaur from Git
Introduce `miaur self-update` / `--self-update` that clones RepoUrl@Branch, detects user vs system install prefix, and reinstalls in place. Configurable via conf/env; supports --noconfirm, --repo-url, and --branch. Co-authored-by: Frank Vitrano <WHC2006@users.noreply.github.com>
This commit is contained in:
co-authored by
Frank Vitrano
parent
bba71040d6
commit
a4f4767c47
+5
-1
@@ -199,11 +199,15 @@ cmd_clean() {
|
||||
dispatch() {
|
||||
# Passthrough for R/D/F/T/U is handled in main() via strip_miaur_opts.
|
||||
# Keep a reconstruction fallback only if somehow reached without orig argv.
|
||||
if [[ $DO_PASSTHRU -eq 1 && $OP != S && $OP != Q && $OP != G && $OP != B && $OP != interactive ]]; then
|
||||
if [[ $DO_PASSTHRU -eq 1 && $OP != S && $OP != Q && $OP != G && $OP != B && $OP != interactive && $OP != selfupdate ]]; then
|
||||
die "internal error: passthrough should be handled in main"
|
||||
fi
|
||||
|
||||
case "$OP" in
|
||||
selfupdate)
|
||||
need_cmd git
|
||||
cmd_self_update
|
||||
;;
|
||||
interactive)
|
||||
need_cmd curl jq
|
||||
cmd_interactive "${TARGETS[@]}"
|
||||
|
||||
Reference in New Issue
Block a user