#!/bin/bash VERSION=$1 if [[ -z $VERSION ]]; then echo "Please specify a kernel version." exit 1 fi curl -sSL https://www.kernel.org/pub/linux/kernel/v3.x/linux-${VERSION}.tar.xz | tar -v -C /usr/src -xJ