Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7a4234
commit f1f61f3
Showing
3 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
#! /usr/bin/sh | ||
# Update | ||
#! /usr/bin/bash --posix | ||
|
||
echo " | ||
Update kernel packages ... | ||
" | ||
sudo dnf update kernel********** | ||
# Update dnf based system, grouping packages: kernel | other | cuda & nvidia | ||
|
||
echo " | ||
Update most available package ... | ||
" | ||
sudo dnf --exclude=kernel* --exclude=*nvidia* --exclude=*cuda* update | ||
_dnf () { | ||
# set to exit on error | ||
set -o errexit | ||
|
||
echo "Sync nvidia" | ||
sudo dnf --exclude=kernel* distrosync *nvidia* | ||
### colourize stream ### | ||
# start RED text: ${RED} | ||
RED=$(tput setaf 1) | ||
# start GREEN text: ${GREEN} | ||
GREEN=$(tput setaf 2) | ||
# start YELLOW text: ${YELLOW} | ||
YELLOW=$(tput setaf 3) | ||
# start PURPLE text: ${PURPLE} | ||
PURPLE=$(tput setaf 125) | ||
# end colour text: ${NORMAL} | ||
NORMAL=$(tput sgr0) | ||
|
||
#echo "Sync cuda" | ||
#sudo dnf --exclude=kernel* distrosync *cuda* | ||
printf "${GREEN}\nUpdating kernel packages... \n${NORMAL}" | ||
sudo dnf -y update kernel kernel-core kernel-devel kernel-headers kernel-modules kernel-modules-extra | ||
|
||
printf "${YELLOW}\nUpdating available packages,\nskipping kernel, cuda & nvidia... \n${NORMAL}" | ||
sudo dnf -y --exclude=kernel* --exclude=*nvidia* --exclude=*cuda* update | ||
|
||
printf "${PURPLE}\nSync nvidia & cuda... \n${NORMAL}" | ||
sudo dnf -y --exclude=kernel* distrosync *cuda* *nvidia* | ||
|
||
# The below packages are often updated but wildcards for nvidia & cuda are more flexible | ||
# akmod-nvidia.x86_64 kmod-nvidia.x86_64 nvidia-persistenced.x86_64 nvidia-settings.x86_64 nvidia-xconfig.x86_64 xorg-x11-drv-nvidia.x86_64 xorg-x11-drv-nvidia-cuda.x86_64 xorg-x11-drv-nvidia-cuda-libs.i686 xorg-x11-drv-nvidia-cuda-libs.x86_64 xorg-x11-drv-nvidia-kmodsrc.x86_64 xorg-x11-drv-nvidia-libs.i686 xorg-x11-drv-nvidia-libs.x86_64 nvidia-driver-cuda.x86_64 nvidia-driver-cuda-libs.x86_64 | ||
printf "${RED}\nEnd\n${NORMAL}" | ||
} | ||
_dnf | ||
|
||
|