Compare commits

...

2 Commits

Author SHA1 Message Date
kvj 36fb18dd19 Fixed playerctl thingy 2023-12-11 20:15:20 +01:00
kvj f7850c2ed0 Fixed playerctl thingy 2023-12-11 20:14:56 +01:00
2 changed files with 71 additions and 1 deletions

71
kernbuild Executable file
View File

@ -0,0 +1,71 @@
#!/bin/bash
red='\033[0;31m'
clear='\033[0m'
green='\033[0;32m'
yellow='\033[0;33m'
blue='\033[0;34m'
italic='\e[3m'
norm='\e[0m'
if [ $USER = "root" ]; then
root=""
else
root="doas"
fi
# echo -e "${blue}${italic} TEXT ${clear}${norm}"
echo -e "${blue}${italic}eselect kernel list ${clear}${norm}"
eselect kernel list
echo -e "${yellow}Is the correct kernel version selected?${clear} [${green}y/${clear}${red}n${clear}]"
read -p "$ ~ "
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo " "
#echo -e "${red} TEXT ${clear}"
echo -e "${red} Changing directory to "/usr/src/linux/".${clear}"
echo -e "${blue}${italic} cd /usr/src/linux/ ${clear}${norm}"
cd /usr/src/linux/ &&
echo " "
echo -e "${yellow}Do you want to change kernel configuration before compiling?${clear} [${green}y/${clear}${red}n${clear}]"
read -p "$ ~ "
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo -e "${red} Running menuconfig. ${clear}"
echo -e "${blue}${italic} ${root} make -j16 menuconfig ${clear}${norm}"
${root} make -j16 menuconfig &&
echo ""
fi
echo -e "${red} Compiling kernel. ${clear}"
echo -e "${blue}${italic} ${root} make -j16 KCFLAGS='-O3 -march=native -mtune=native -pipe' ${clear}${norm}"
${root} make -j16 KCFLAGS="-O3 -march=native -mtune=native -pipe" &&
echo " "
echo -e "${red} Installing modules. ${clear}"
echo -e "${blue}${italic} ${root} make modules_install ${clear}${norm}"
${root} make modules_install &&
echo " "
echo -e "${red} Installing kernel. ${clear}"
echo -e "${blue}${italic} ${root} make install ${clear}${norm}"
${root} make install &&
echo " "
echo -e "${red} Installing nVidia GPU drivers. ${clear}"
echo -e "${blue}${italic} ${root} emerge nvidia-drivers ${clear}${norm}"
${root} emerge nvidia-drivers &&
echo " "
echo -e "${red} Updating GRUB' configuration file.${clear}"
echo -e "${blue}${italic} ${root} grub-mkconfig -o /boot/grub/grub.cfg ${clear}${norm}"
${root} grub-mkconfig -o /boot/grub/grub.cfg
echo " "
fi

View File

@ -1 +0,0 @@
fixed playerctl thingy