Skip to content

Instantly share code, notes, and snippets.

@haruue
Last active April 6, 2023 10:29
Embed
What would you like to do?
#!/bin/bash
pacman -Sy
pacman -S --needed archlinux-keyring
if [[ -f '/var/lib/pacman/sync/archlinuxcn.db' ]]; then
pacman -S --needed archlinuxcn-keyring
fi
ignore_packages=(
'linux'
'linux-*'
'nvidia'
'nvidia-*'
'cuda'
'*-cuda*'
'cudnn'
'dkms'
'*-dkms'
)
pacman_args=(-Syu)
for pkg in "${ignore_packages[@]}"; do
pacman_args+=(--ignore)
pacman_args+=("$pkg")
done
pacman "${pacman_args[@]}" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment