chiark
/
gitweb
/
~cjwatson
/
bin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e427ec7
)
Sync with the version I use at work.
author
Colin Watson
<cjwatson@chiark.greenend.org.uk>
Mon, 19 Aug 2002 08:36:16 +0000
(08:36 +0000)
committer
Colin Watson
<cjwatson@chiark.greenend.org.uk>
Mon, 19 Aug 2002 08:36:16 +0000
(08:36 +0000)
get-kernel
patch
|
blob
|
history
diff --git
a/get-kernel
b/get-kernel
index c4d9b92f92e975180e29df4eb41e950587414d7e..bd9b91691946e91ec97372b36f0d0692484b830b 100755
(executable)
--- a/
get-kernel
+++ b/
get-kernel
@@
-1,11
+1,15
@@
#! /bin/sh -e
#! /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
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