Skip to content

Commit

Permalink
updated dnf.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilRedHorse committed Apr 11, 2020
1 parent b7a4234 commit f1f61f3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
Binary file modified install-c/sixpair 100644 → 100755
Binary file not shown.
Empty file modified install-c/sixpair.c 100644 → 100755
Empty file.
44 changes: 30 additions & 14 deletions install-sh/dnf.sh
@@ -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


0 comments on commit f1f61f3

Please sign in to comment.