Add remaining Linux kernel 3.0 patches and port nightly build scripts to 3.0 too.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3783 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-07-27 14:05:47 +00:00
parent 4f828ba8a3
commit dbc55781d7
11 changed files with 136 additions and 52 deletions
+21
View File
@@ -0,0 +1,21 @@
# -*- mode: shell-script -*-
# Shell functions for parsing the Linux kernel version.
# Kernel version number.
function kernel_version {
if [ "${1#2.}" != "$1" ]; then
echo "$1" | sed -n 's/^\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/p'
else
echo "$1" | sed -n 's/^\([0-9]*\.[0-9]*\).*$/\1/p'
fi
}
# Last component of the kernel version, or the empty string if $1 does
# not contain a patchlevel.
function patchlevel {
if [ "${1#2.}" != "$1" ]; then
echo "$1" | sed -n 's/^\([0-9]*\.[0-9]*\.[0-9]*\)[.-]\(.*\)$/\2/p'
else
echo "$1" | sed -n 's/^\([0-9]*\.[0-9]*\)[.-]\(.*\)$/\2/p'
fi
}