nsbin/get-latest-kernel

29 lines
631 B
Text
Raw Normal View History

2006-07-20 07:54:37 +00:00
#!/bin/sh
#
# Nico Schottelius <nico-linux@schottelius.(net|org)>
# Date: 2006-03-20
# Last Modified: ls -l
# Version: 0.1
# Comment: based on latest-kernel 1.4
# (http://linux.schottelius.org/scripts/#latest-kernel)
# Copying: GPL2
#
VERSION=$(curl -s http://ftp.kernel.org/pub/linux/kernel/v2.6/ | grep LATEST-IS- | sed 's/.*LATEST-IS-\(.*\)<\/a.*/\1/')
echo "Retrieving Kernel version $VERSION ..."
#
# Get kernel via http, so proxies can cache it
#
BASEURL="http://www.kernel.org/pub/linux/kernel/v2.6/linux-"
#
# get .tar.bz2
#
EXTENSION=".tar.bz2"
FULL_URL=${BASEURL}${VERSION}${EXTENSION}
wget -c "$FULL_URL"