android_kernel_xiaomi_sm8350/.travis_get_mainline_kernel
Namjae Jeon 92d4cd0cde exfat: add travis-CI build and test support
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
2020-02-03 22:43:47 +09:00

38 lines
770 B
Bash
Executable File

#!/bin/sh
#
# A simple script we are using to get the latest mainline kernel
# tar ball
#
wget https://www.kernel.org/releases.json
if [ $? -ne 0 ]; then
echo "Could not download kernel.org/releases.json"
exit 1
fi
VER=$(cat releases.json | python2.7 -c "import sys, json; print json.load(sys.stdin)['latest_stable']['version']")
if [ $? -ne 0 ]; then
echo "Could not parse release.json"
exit 1
fi
if [ "z$VER" = "z" ]; then
echo "Could not determine latest release version"
exit 1
fi
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$VER".tar.gz
if [ $? -ne 0 ]; then
echo "Could not download $VER kernel version"
exit 1
fi
tar xf linux-"$VER".tar.gz
if [ $? -ne 0 ]; then
echo "Could not untar kernel tar ball"
exit 1
fi
mv linux-"$VER" linux