Fixed return error due to not being contained within function
This commit is contained in:
parent
88897ae59f
commit
a7cb3530eb
@ -103,18 +103,20 @@ fi
|
|||||||
make -j $(nproc --all)
|
make -j $(nproc --all)
|
||||||
make modules_install INSTALL_MOD_STRIP=1 install
|
make modules_install INSTALL_MOD_STRIP=1 install
|
||||||
|
|
||||||
|
function install_kernel() {
|
||||||
|
declare -r distroId="$(awk -F= '$1=="ID"{print $NF}' /etc/os-release)"
|
||||||
case "${distroId,,}" in
|
case "${distroId,,}" in
|
||||||
*void*)
|
*void*)
|
||||||
cp ./arch/x86_64/boot/bzImage /boot/vmlinuz-"$KVER"
|
cp ./arch/x86_64/boot/bzImage /boot/vmlinuz-"$KVER"
|
||||||
dracut --kver "$KVER" --force
|
dracut --kver "$KVER" --force
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
xbps-reconfigure -fa
|
xbps-reconfigure -fa
|
||||||
/usr/bin/update-grub
|
/usr/bin/update-grub
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
*debian*|*ubuntu*)
|
*debian*|*ubuntu*)
|
||||||
cp ./arch/x86_64/boot/bzImage /boot/vmlinuz-"$KVER"
|
cp ./arch/x86_64/boot/bzImage /boot/vmlinuz-"$KVER"
|
||||||
dracut --kver "$KVER" --force
|
dracut --kver "$KVER" --force
|
||||||
update-grub2
|
update-grub2
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@ -126,7 +128,11 @@ case "${distroId,,}" in
|
|||||||
printf '%s\n' "Unable to detect Operating System!" >&2
|
printf '%s\n' "Unable to detect Operating System!" >&2
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
install_kernel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Remove sysmap/signing keys
|
# Remove sysmap/signing keys
|
||||||
|
Loading…
Reference in New Issue
Block a user