bootstrap: require chaotic-aur repo in pacman.conf for skip; topgrade cargo fallback
This commit is contained in:
parent
0bdaefcf97
commit
63106f5e3f
2 changed files with 9 additions and 4 deletions
|
|
@ -21,8 +21,8 @@ die() { printf '\033[1;31m[chaotic ERROR]\033[0m %s\n' "$*" >&2; exit 1; }
|
|||
# and pacman-key operations below.
|
||||
|
||||
{{ if eq .os_family "arch" -}}
|
||||
if command -v paru >/dev/null 2>&1; then
|
||||
log "paru already installed — skipping chaotic setup"
|
||||
if command -v paru >/dev/null 2>&1 && sudo grep -q "^\[chaotic-aur\]" /etc/pacman.conf; then
|
||||
log "chaotic-aur + paru already set up — skipping"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -68,8 +68,13 @@ log "skipping cargo bat install (os_family={{ .os_family }}, pacman handles it)"
|
|||
# - gentoo: topgrade is in GURU overlay. Use emerge.
|
||||
if ! command -v topgrade >/dev/null 2>&1; then
|
||||
{{ if eq .os_family "arch" -}}
|
||||
if sudo grep -q "^\[chaotic-aur\]" /etc/pacman.conf; then
|
||||
log "installing topgrade via pacman (chaotic-aur)"
|
||||
sudo pacman -S --needed --noconfirm topgrade
|
||||
else
|
||||
log "chaotic-aur not configured — falling back to cargo install topgrade"
|
||||
cargo install topgrade --locked
|
||||
fi
|
||||
{{ else if eq .os_family "debian" -}}
|
||||
log "installing topgrade via cargo (debian has no topgrade package)"
|
||||
cargo install topgrade --locked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue