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:
Cursor Agent
2026-07-23 14:44:24 +00:00
co-authored by Frank Vitrano
parent bba71040d6
commit a4f4767c47
11 changed files with 293 additions and 8 deletions
+4
View File
@@ -22,6 +22,8 @@ MIAUR_MAKEPKG="${MIAUR_MAKEPKG:-makepkg}"
MIAUR_PACMAN="${MIAUR_PACMAN:-pacman}"
MIAUR_BAT="${MIAUR_BAT:-bat}"
MIAUR_EDITOR="${VISUAL:-${EDITOR:-nano}}"
MIAUR_REPO="${MIAUR_REPO:-https://github.com/WHC2006/miaur.git}"
MIAUR_BRANCH="${MIAUR_BRANCH:-main}"
_bool_val() {
case "${1,,}" in
@@ -73,6 +75,8 @@ miaur_load_config() {
Pacman) MIAUR_PACMAN=$val ;;
Bat) MIAUR_BAT=$val ;;
Editor) MIAUR_EDITOR=$val ;;
RepoUrl | MIAUR_REPO) MIAUR_REPO=$val ;;
Branch | MIAUR_BRANCH) MIAUR_BRANCH=$val ;;
esac
done <"$conf"
}