Skip to content

Commit

Permalink
Fix .0 version number
Browse files Browse the repository at this point in the history
  • Loading branch information
No9 authored and fntlnz committed Apr 12, 2020
1 parent 12bac8f commit adae952
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/init/fetch-linux-headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ fetch_generic_linux_sources()
kernel_version="$(echo "${KERNEL_VERSION}" | awk -vFS='[-+]' '{ print $1 }')"
major_version="$(echo "${KERNEL_VERSION}" | awk -vFS=. '{ print $1 }')"

# Remove the '.0' as the intial kernel major release isn't published with a patch number.
if [[ $kernel_version == *.0 ]]; then
kernel_version=$(echo $kernel_version | rev | sed s/0\.// | rev)
fi

echo "Fetching upstream kernel sources for ${kernel_version}."
mkdir -p "${BUILD_DIR}"
curl -sL "https://www.kernel.org/pub/linux/kernel/v${major_version}.x/linux-$kernel_version.tar.gz" \
Expand Down

0 comments on commit adae952

Please # to comment.