diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-01 15:59:53 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-11-01 15:59:53 -0400 |
commit | ac8a3c832addc68ee4ad01337a17f63bdb4138ab (patch) | |
tree | b9ccb584dcb48b57b1cf21ffc32bbf4cf125d5be /install_kernel.jupiter-cs | |
parent | 0863fa86da554b29f7ff0b24b8c0ec09ed024792 (diff) |
use the version file created by the kernel build system
This might also be interesting for other machines.
Diffstat (limited to 'install_kernel.jupiter-cs')
-rwxr-xr-x | install_kernel.jupiter-cs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/install_kernel.jupiter-cs b/install_kernel.jupiter-cs index 720fb9c..37d25ea 100755 --- a/install_kernel.jupiter-cs +++ b/install_kernel.jupiter-cs | |||
@@ -20,13 +20,6 @@ function silent() | |||
20 | fi | 20 | fi |
21 | } | 21 | } |
22 | 22 | ||
23 | # Function to grab var from src | ||
24 | function getvar() { | ||
25 | old=$(head -5 Makefile | grep "^$1") | ||
26 | echo $(echo ${old/"$1 ="/} | sed -e "s/[ ]*\(.*\)[ ]*/\1/g") | ||
27 | return 0 | ||
28 | } | ||
29 | |||
30 | if [ ! -f "./.config" ]; then | 23 | if [ ! -f "./.config" ]; then |
31 | CURDIR=`pwd` | 24 | CURDIR=`pwd` |
32 | die "No kernel .config exists in $CURDIR!" | 25 | die "No kernel .config exists in $CURDIR!" |
@@ -36,14 +29,12 @@ if [ ! -f "./Makefile" ]; then | |||
36 | die "No Makefile present!" | 29 | die "No Makefile present!" |
37 | fi | 30 | fi |
38 | 31 | ||
39 | VERSION=`getvar VERSION` | 32 | NAME=`cat include/config/kernel.release` |
40 | PATCHLEVEL=`getvar PATCHLEVEL` | ||
41 | SUBLEVEL=`getvar SUBLEVEL` | ||
42 | EXTRAVERSION=`getvar EXTRAVERSION` | ||
43 | 33 | ||
44 | . ./.config | 34 | if [ -z "$NAME" ] |
45 | 35 | then | |
46 | NAME="$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION$CONFIG_LOCALVERSION" | 36 | die "Could not determine kernel version!" |
37 | fi | ||
47 | 38 | ||
48 | info "Detected kernel version $NAME" | 39 | info "Detected kernel version $NAME" |
49 | 40 | ||