Added chromatic repo

This commit is contained in:
2025-03-15 22:03:50 +01:00
parent df8bfc3e75
commit 3c0b78d8f2

View File

@@ -26,48 +26,62 @@ add_repositories() {
"BlackArch" "Add BlackArch repository" OFF
"Chaotic.cx" "Add Chaotic.cx repository" OFF
"CachyOS" "Add CachyOS repository" OFF
"Chromatic" "Add Chromatic repository" OFF
)
selected_repos=$(whiptail --title "Add Repositories" --checklist \
"Choose the repositories you want to add:" 20 78 3 \
"Choose the repositories you want to add:" 20 78 4 \
"${options[@]}" 3>&1 1>&2 2>&3)
for repo in $selected_repos; do
case $repo in
"\"BlackArch\"")
if ! grep -q "\[blackarch\]" /etc/pacman.conf; then
curl -O https://blackarch.org/strap.sh
chmod +x strap.sh
sudo sed -i 's/msg '\''installing blackarch-officials meta-package...'\''/#msg '\''installing blackarch-officials meta-package...'\''/' strap.sh
sudo sed -i 's/pacman -S --noconfirm --needed blackarch-officials/#pacman -S --noconfirm --needed blackarch-officials/' strap.sh
sudo ./strap.sh
else
echo "BlackArch repository is already installed."
fi
;;
"\"Chaotic.cx\"")
if ! grep -q "\[chaotic-aur\]" /etc/pacman.conf; then
sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
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'
echo '[chaotic-aur]' | sudo tee -a /etc/pacman.conf
echo 'Include = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf
else
echo "Chaotic.cx repository is already installed."
fi
;;
"\"CachyOS\"")
if ! grep -q "\[cachyos\]" /etc/pacman.conf; then
curl https://mirror.cachyos.org/cachyos-repo.tar.xz -o /tmp/cachyos-repo.tar.xz
tar xvf /tmp/cachyos-repo.tar.xz -C /tmp
cd /tmp/cachyos-repo || exit
sudo ./cachyos-repo.sh
else
echo "CachyOS repository is already installed."
fi
;;
esac
if ! grep -q "\[blackarch\]" /etc/pacman.conf; then
curl -O https://blackarch.org/strap.sh
chmod +x strap.sh
sudo sed -i 's/msg '\''installing blackarch-officials meta-package...'\''/#msg '\''installing blackarch-officials meta-package...'\''/' strap.sh
sudo sed -i 's/pacman -S --noconfirm --needed blackarch-officials/#pacman -S --noconfirm --needed blackarch-officials/' strap.sh
sudo ./strap.sh
else
echo "BlackArch repository is already installed."
fi
;;
"\"Chaotic.cx\"")
if ! grep -q "\[chaotic-aur\]" /etc/pacman.conf; then
sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
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'
echo '[chaotic-aur]' | sudo tee -a /etc/pacman.conf
echo 'Include = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf
else
echo "Chaotic.cx repository is already installed."
fi
;;
"\"CachyOS\"")
if ! grep -q "\[cachyos\]" /etc/pacman.conf; then
curl https://mirror.cachyos.org/cachyos-repo.tar.xz -o /tmp/cachyos-repo.tar.xz
tar xvf /tmp/cachyos-repo.tar.xz -C /tmp
cd /tmp/cachyos-repo || exit
sudo ./cachyos-repo.sh
else
echo "CachyOS repository is already installed."
fi
;;
"\"Chromatic\"")
if ! grep -q "\[chromatic\]" /etc/pacman.conf; then
sudo pacman-key --recv-key 6EFB412EBDDD1853DF71F4B625AE803AA8C39062 --keyserver keys.openpgp.org
sudo pacman-key --lsign-key 6EFB412EBDDD1853DF71F4B625AE803AA8C39062
sudo pacman -U --noconfirm 'https://mirror.trap.moe/chromatic/x86_64/chromatic-keyring-1.0-1-any.pkg.tar.zst'
sudo pacman -U --noconfirm 'https://mirror.trap.moe/chromatic/x86_64/chromatic-mirrorlist-20250315-1-any.pkg.tar.zst'
echo '[chromatic]' | sudo tee -a /etc/pacman.conf
echo 'Include = /etc/pacman.d/chromatic-mirrorlist' | sudo tee -a /etc/pacman.conf
sudo pacman -Sy --noconfirm chromatic-keyring
else
echo "Chromatic repository is already installed."
fi
;;
esac
done
}