Files
dotfiles/installer/01-install-cachy.sh
T
2026-06-16 03:54:27 +00:00

51 lines
1.6 KiB
Bash
Executable File

#!/bin/sh -e
# SjB TODO:
# - install public keys
sudo pacman -Syu --noconfirm
if [[ "$(uname -m)" == "x86_64" ]]; then
if ! pacman-key --list-keys 882DCFE48E2051D48E2562ABF3B607488DB35A47 >/dev/null 2>&1; then
sudo pacman-key --recv-key 882DCFE48E2051D48E2562ABF3B607488DB35A47 && sudo pacman-key --lsign-key 882DCFE48E2051D48E2562ABF3B607488DB35A47
fi
if sudo pacman -U --noconfirm https://cdn77.cachyos.org/repo/x86_64/cachyos/archlinux-keyring-20260420-2-any.pkg.tar.zst &&
sudo pacman -U --noconfirm https://cdn77.cachyos.org/repo/x86_64/cachyos/cachyos-mirrorlist-27-1-any.pkg.tar.zst; then
if ! grep -q "^\[cachyos\]" /etc/pacman.conf; then
echo -e '\n[cachyos]\nInclude = /etc/pacman.d/cachyos-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null
fi
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
sudo sed -i '/^#\[multilib\]/,/^#Include/ s/^#//' /etc/pacman.conf
fi
sudo pacman -Sy --needed --noconfirm chwd || exit 1
sudo chwd -a || exit 1
else
echo "Failed to install Cachyos, so won't include it in pacman config!"
fi
fi
if [[ ! -x "$(command -v paru)" ]]; then
sudo pacman -S --noconfirm --needed paru || exit 1
fi
paru -Sy --noconfirm \
cachyos-hello \
cachyos-hooks \
cachyos-kernel-manager \
cachyos-keyring \
cachyos-mirrorlist \
cachyos-nord-gtk-theme-git \
cachyos-packageinstaller \
cachyos-rate-mirrors \
cachyos-settings \
cachyos-v3-mirrorlist \
cachyos-v4-mirrorlist \
cachyos-wallpapers \
cachyos-fish-config \
linux-cachyos \
linux-cachyos-headers