From 66b0fa02273853a50736998d42ca9db33e0cb6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saull=20Brand=C3=A3o?= Date: Thu, 24 Jul 2025 07:38:18 -0300 Subject: [PATCH] add chaotic aur add chaotic aur repo add noconfirm only add chaotic aur for x86-64 arch --- install/1-setup-aur-support.sh | 37 ++++++++++++++++++++++++++++++++++ install/1-yay.sh | 16 --------------- migrations/1753352057.sh | 17 ++++++++++++++++ 3 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 install/1-setup-aur-support.sh delete mode 100644 install/1-yay.sh create mode 100755 migrations/1753352057.sh diff --git a/install/1-setup-aur-support.sh b/install/1-setup-aur-support.sh new file mode 100644 index 0000000..02ff90d --- /dev/null +++ b/install/1-setup-aur-support.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Only add Chaotic-AUR if the architecture is x86_64 so ARM users can build the packages +if [[ "$(uname -m)" == "x86_64" ]]; then + # Import Chaotic-AUR key + sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com + sudo pacman-key --lsign-key 3056513887B78AEB + + # 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' + + # 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 + + # Refresh pacman package databases + sudo pacman -Sy + + # Install yay + sudo pacman -S --needed --noconfirm yay +else + sudo pacman -S --needed --noconfirm base-devel + + if ! command -v yay &>/dev/null; then + cd /tmp + git clone https://aur.archlinux.org/yay-bin.git + cd yay-bin + makepkg -si --noconfirm + cd - + rm -rf yay-bin + cd ~ + fi + +fi + +# Add fun and color to the pacman installer +sudo sed -i '/^\[options\]/a Color\nILoveCandy' /etc/pacman.conf diff --git a/install/1-yay.sh b/install/1-yay.sh deleted file mode 100644 index df6a9cd..0000000 --- a/install/1-yay.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -sudo pacman -S --needed --noconfirm base-devel - -if ! command -v yay &>/dev/null; then - cd /tmp - git clone https://aur.archlinux.org/yay-bin.git - cd yay-bin - makepkg -si --noconfirm - cd - - rm -rf yay-bin - cd ~ - - # Add fun and color to the pacman installer - sudo sed -i '/^\[options\]/a Color\nILoveCandy' /etc/pacman.conf -fi diff --git a/migrations/1753352057.sh b/migrations/1753352057.sh new file mode 100755 index 0000000..2d5cded --- /dev/null +++ b/migrations/1753352057.sh @@ -0,0 +1,17 @@ +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 + + # 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' + + # 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 + + # Refresh pacman package databases + sudo pacman -Sy +fi