#!/bin/sh
VERSION=$1
+INSTALLED_VERSION=$2
download="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${VERSION}.tar.xz"
make -j8 bzImage modules
make modules_install
-cp arch/x86/boot/bzImage /boot/vmlinuz-${VERSION}-maxf130
-cp .config /boot/config-${VERSION}-maxf130
-cp System.map /boot/System.map-${VERSION}-maxf130
+cp arch/x86/boot/bzImage /boot/vmlinuz-${INSTALLED_VERSION}-maxf130
+cp .config /boot/config-${INSTALLED_VERSION}-maxf130
+cp System.map /boot/System.map-${INSTALLED_VERSION}-maxf130
-dkms autoinstall -k ${VERSION}-maxf130
+dkms autoinstall -k ${INSTALLED_VERSION}-maxf130
-mkinitrd -F /etc/mkinitrd.conf -k ${VERSION}-maxf130 -o /boot/initrd-${VERSION}-maxf130.gz
-vim /etc/lilo.conf
-lilo
+mkinitrd -F /etc/mkinitrd.conf -k ${INSTALLED_VERSION}-maxf130 -o /boot/initrd-${INSTALLED_VERSION}-maxf130.gz
+grub-mkconfig -o /boot/grub/grub.cfg
echo "The following packages will need to be rebuilt:"
grep -l "lib/modules/$(uname -r)" /var/log/packages/*