The 'kernels' variable is supposed to contain a list of kernels, but it
actually only contains the latest kernel. This is not a problem since so fare
we only use this script when there is only one kernel, but nevertheless, worth
fixing.
Change-Id: I1dea6cc09de20dd0fae21a9eebd614f6fdb50549
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
cp "$gummiboot_path/gummibootx64.efi" "$esp/EFI/boot/bootx64.efi"
# Generate the list of installed kernels
-kernels="$(ls -1 "$esp" | grep "^vmlinuz-" | sort -r | head -n1)"
+kernels="$(ls -1 "$esp" | grep "^vmlinuz-" | sort -r)"
# Get the newest kernel
newest_kernel="$(printf "%s" "$kernels" | head -n1)"