Ensure kernel-install is not passed extra params for remove

This commit is contained in:
dalto 2023-07-22 09:31:10 -05:00
parent d346950ff8
commit 56f8cfe6a5
1 changed files with 9 additions and 3 deletions

View File

@ -8,9 +8,15 @@ while read -r line; do
fi
version=$(basename "${line%/vmlinuz}")
echo ":: Running kernel-install for kernel $version"
kernel-install $1 "${version}" "${line}"
if [[ $1 == "remove" ]]; then
echo ":: kernel-install removing kernel $version"
kernel-install remove "${version}"
elif [[ $1 == "add" ]]; then
echo ":: kernel-install installing kernel $version"
kernel-install add "${version}" "${line}"
else
echo ":: Invalid option passed to kernel-install script"
fi
done
if [[ $all == 1 ]]; then