1
0
Fork 0

fedora: fix pkg {,un}installation

This commit is contained in:
Pratham Patel 2024-04-18 08:01:42 +05:30
parent 9cabe3c8dd
commit 6c4d05b757
Signed by: thefossguy
SSH Key Fingerprint: SHA256:HwRBy9H1FYXWcv/Qi1WY3kmcVtGz2ydZuPJgD4pkusY
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ function build_kernel() {
function install_kernel() {
if [[ "${INSTALL_ZE_KERNEL}" == '1' ]]; then
sudo rpm -i "rpmbuild/RPMS/$(uname -m)"/*."$(uname -m).rpm"
sudo dnf localinstall --assumeyes "rpmbuild/RPMS/$(uname -m)"/*."$(uname -m).rpm"
fi
}
@ -24,5 +24,5 @@ if [[ -z "${1:-}" ]]; then
build_kernel
install_kernel
else
rpm -qa | grep '^kernel' | grep "$1" | xargs sudo dnf autoremove --assumeyes
sudo dnf autoremove $(rpm -qa | grep '^kernel' | grep "$1")
fi