Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-06-02 10:54:32 +0200
committerMichal Marek <mmarek@suse.cz>2011-07-25 12:26:04 +0200
commit2f842929de4f29a7e81c27986eb81e24f93e3242 (patch)
treeb76fee25774cca5b963babd41d096a3ae7fa69fd
parentaecea14d07e72a88b2926bed0f5ca276a4988b66 (diff)
mainline-commit: Fix kernel_version() to work with 3.0
-rwxr-xr-xscripts/mainline-commit11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/mainline-commit b/scripts/mainline-commit
index 1a4d343c5d..585978463e 100755
--- a/scripts/mainline-commit
+++ b/scripts/mainline-commit
@@ -165,10 +165,13 @@ kernel_version()
{
local version=$1 major minor micro
- major=${version%%.*}; version=${version#*.}
- minor=${version%%.*}; version=${version#*.}
- micro=${version%%[^0-9]*}
- expr "$major" '*' 65536 '+' "$minor" '*' 256 + "$micro"
+ version=${version%%[^0-9.]*}
+ local IFS=.
+ set -- $version
+ major=$1
+ minor=$2
+ micro=$3
+ expr "$major" '*' 65536 '+' "0$minor" '*' 256 + "0$micro"
}
get_base_id()