From 38f30f39d04f87b1b30d635378d026856504147a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Aug 2002 08:36:16 +0000 Subject: [PATCH] Sync with the version I use at work. --- get-kernel | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/get-kernel b/get-kernel index c4d9b92..bd9b916 100755 --- a/get-kernel +++ b/get-kernel @@ -1,11 +1,15 @@ #! /bin/sh -e -VERSION=$1 -MAJOR=`expr $1 : '\(^[0-9]*\.[0-9]*\)'` +if [ -z "$1" ]; then + echo >&2 "No version specified, stopping." + exit 1 +fi + +VERSION="$1" +MAJOR="${1%.*}" rm -f linux -wget -c ftp://ftp.kernel.org/pub/linux/kernel/v$MAJOR/linux-$VERSION.tar.bz2 -tar xjvf linux-$VERSION.tar.bz2 -rm -f linux-$VERSION.tar.bz2 -mv linux linux-$VERSION -ln -s linux-$VERSION linux +wget -c "ftp://ftp.kernel.org/pub/linux/kernel/v$MAJOR/linux-$VERSION.tar.bz2" +tar xjvf "linux-$VERSION.tar.bz2" +mv linux "linux-$VERSION" +ln -s "linux-$VERSION" linux -- 2.30.2