Merge pull request #359 from saullrb/dev

Better handle chaotic aur installation
This commit is contained in:
David Heinemeier Hansson
2025-07-26 12:55:26 -04:00
committed by GitHub
2 changed files with 32 additions and 27 deletions

View File

@ -1,21 +1,20 @@
echo "Add Chaotic-AUR to get compiled binaries"
if [[ "$(uname -m)" == "x86_64" ]] && ! grep -q '^\[chaotic-aur\]' /etc/pacman.conf; then
# Import Chaotic-AUR key
sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key 3056513887B78AEB
# Try installing Chaotic-AUR keyring and mirrorlist
if sudo pacman-key --recv-key 3056513887B78AEB &&
sudo pacman-key --lsign-key 3056513887B78AEB &&
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'; then
# Install Chaotic-AUR keyring and mirrorlist
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'
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
# Refresh pacman package databases
sudo pacman -Sy
chaotic_ok=1
else
echo "Failed to install Chaotic-AUR, so won't include it in pacman config!"
fi
fi