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
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user