scripts: Update kernel download location

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2017-05-02 14:10:22 +00:00
parent 7d9994593f
commit acc573a2bb
2 changed files with 6 additions and 21 deletions

View File

@@ -2,8 +2,7 @@
# Shell functions for parsing the Linux kernel version and for downloading
# from kernel.org.
kernel_mirror="http://ftp.kernel.org/pub/linux/kernel"
kernel_longterm="http://www.kernel.org/pub/linux/kernel"
kernel_mirror="http://cdn.kernel.org/pub/linux/kernel"
kernel_sources="$HOME/software/downloads"
# Kernel version number.
@@ -53,16 +52,13 @@ function download_kernel {
(
cd "${kernel_sources}" || return $?
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"
download_file "${kernel_mirror}/v$series/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" \
|| return $?
download_file "${kernel_mirror}/v$series/linux-${kver}.tar.xz" ||
return $?
else
download_file "${kernel_mirror}/v$series/linux-$1.tar.xz" \
|| download_file "${kernel_mirror}/v$series/longterm/v${kver}/linux-$1.tar.xz" \
|| return $?
download_file "${kernel_mirror}/v$series/linux-$1.tar.xz" ||
return $?
fi
)
}