mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 04:09:23 +00:00
Protect pacman config from adopting broken mirror setup
This commit is contained in:
@ -9,8 +9,12 @@ if [[ "$(uname -m)" == "x86_64" ]] && ! grep -q '^\[chaotic-aur\]' /etc/pacman.c
|
||||
sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
|
||||
sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
|
||||
|
||||
# Add Chaotic-AUR repo to pacman config
|
||||
echo -e '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null
|
||||
if [[ -f /etc/pacman.d/chaotic-mirrorlist ]]; then
|
||||
# Add Chaotic-AUR repo to pacman config
|
||||
echo -e '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null
|
||||
else
|
||||
echo "Failed to download chaotic-mirrorlist, so won't include it in pacman config!"
|
||||
fi
|
||||
|
||||
# Refresh pacman package databases
|
||||
sudo pacman -Sy
|
||||
|
Reference in New Issue
Block a user