Skip to content

Instantly share code, notes, and snippets.

@lemehmet
Last active December 31, 2020 04:24
Show Gist options
  • Save lemehmet/dab21dd65515a5ac480d36f9d7315283 to your computer and use it in GitHub Desktop.
Save lemehmet/dab21dd65515a5ac480d36f9d7315283 to your computer and use it in GitHub Desktop.
Downloads the selected kernel from the ubuntu ppa
#!/usr/bin/env bash
set euo pipefail
base_version=5.10.4
version=${base_version}-051004
# (generic|lowlatency)
variant=generic
arch=amd64
timestamp=202012301142
function download() {
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v${base_version}/${arch}/linux-headers-${version}-${variant}_${version}.${timestamp}_${arch}.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v${base_version}/${arch}/linux-headers-${version}_${version}.${timestamp}_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v${base_version}/${arch}/linux-image-unsigned-${version}-${variant}_${version}.${timestamp}_${arch}.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v${base_version}/${arch}/linux-modules-${version}-${variant}_${version}.${timestamp}_${arch}.deb
}
function main() {
if [ -d "${base_version}" ]; then
echo "Folder ${base_version} already exists, please remove it first"
else
mkdir -p "${base_version}" && \
pushd ${base_version} && \
download && \
popd
fi
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment