if [ "$EUID" = 0 ] then echo "Please don't run this as root" exit fi if [ ! -d src ] then wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.5.tar.xz mkdir src mv linux-5.15.5.tar.xz src/ cd src tar xf linux-5.15.5.tar.xz rm linux-5.15.5.tar.xz mv linux-5.15.5/* . rm -rf linux-5.15.5 cd - fi cd src # make clean qui supprime le .config #make mrproper cp ../.config .config make -j$(nproc) bzImage make -j$(nproc) modules sudo cp arch/x86_64/boot/bzImage ../../rootfs/boot/vmlinuz || exit 1 sudo cp System.map ../../rootfs/boot/System.map || exit 1 DESTDIR=$(pwd)/../../rootfs sudo make modules_install INSTALL_MOD_PATH=$(realpath $DESTDIR) || exit 1 cd -