mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
scripts/kernel-functions: Handle 3.x.0 kernel versions correctly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5658 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -53,9 +53,9 @@ function download_kernel {
|
||||
test -w "${kernel_sources}" || return $?
|
||||
(
|
||||
cd "${kernel_sources}" || return $?
|
||||
if [ "$plevel" = "" ] \
|
||||
|| download_file "${kernel_mirror}/v$series/patch-$1.xz" \
|
||||
|| download_file "${kernel_mirror}/v$series/longterm/v${kver}/patch-$1.xz"
|
||||
if [ "$plevel" = "" -o "$plevel" = "0" ] ||
|
||||
download_file "${kernel_mirror}/v$series/patch-$1.xz" ||
|
||||
download_file "${kernel_mirror}/v$series/longterm/v${kver}/patch-$1.xz"
|
||||
then
|
||||
download_file "${kernel_mirror}/v$series/linux-${kver}.tar.xz" \
|
||||
|| download_file "${kernel_mirror}/v$series/longterm/v${kver}/linux-${kver}.tar.xz" \
|
||||
@@ -87,14 +87,16 @@ function extract_kernel_tree {
|
||||
mkdir "${tmpdir}" || return $?
|
||||
(
|
||||
cd "${tmpdir}" || return $?
|
||||
if [ "$plevel" != "" -a -e "${kernel_sources}/patch-$1.xz" ]; then
|
||||
if [ "$plevel" != "" -a "$plevel" != "0" -a \
|
||||
-e "${kernel_sources}/patch-$1.xz" ]; then
|
||||
extract_kernel_archive $kver || return $?
|
||||
mv linux-$kver linux-$1
|
||||
( cd linux-$1 && xz -cd "${kernel_sources}/patch-$1.xz" \
|
||||
| patch -p1 -f -s; ) \
|
||||
|| return $?
|
||||
else
|
||||
extract_kernel_archive $1 || return $?
|
||||
extract_kernel_archive $kver || return $?
|
||||
mv linux-$kver linux-$1
|
||||
fi
|
||||
mv "linux-$1" ".." || return $?
|
||||
cd "../linux-$1" || return $?
|
||||
|
||||
Reference in New Issue
Block a user