Use 'find' instead of 'ls' to find kernel image
This commit is contained in:
parent
c460a9f058
commit
8390bad7f1
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ mount -o bind "${basedir}/bootp/" ubuntusway-$architecture/boot/firmware
|
|||
# Copy Raspberry Pi specific files
|
||||
cp -rv "${rootdir}"/rpi/rootfs/system-boot/* ubuntusway-${architecture}/boot/firmware/
|
||||
|
||||
NEW_KERNEL=$(ls -1 ubuntusway-$architecture/boot/vmlinuz-* | tail -n1 | awk -F/ '{print $NF}' | cut -d'-' -f2-4)
|
||||
NEW_KERNEL=$(find ubuntusway-$architecture/boot/vmlinuz-* | tail -n1 | awk -F/ '{print $NF}' | cut -d'-' -f2-4)
|
||||
if [ -z "${NEW_KERNEL}" ]; then
|
||||
echo "ERROR! Could not detect the new kernel version"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue