diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 3598c910..1e3d369a 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -46,15 +46,13 @@ jobs: [ "${{ matrix.cc }}" != "gcc-4.8" ] || sudo apt-get -y install gcc-4.8 - name: Setup Linux run: | + install -d kernel if [ "$KSER" == "latest" ]; then KSER=$(curl -s https://cdn.kernel.org/pub/linux/kernel/ | grep -o 'v[0-9]\+\.[0-9a-zA-Z]\+/' | sed 's/\/\s*//' | sort -t. -k2,2V -k3,3V -k4,4V | tail -n 1 | sed 's/v//') fi - if [ "$KVER" == "latest" ]; then KVER=$(curl -s https://cdn.kernel.org/pub/linux/kernel/v$KSER/ | grep -o 'linux-[0-9]\+\.[0-9]\+\.[0-9]\+\.tar\.xz' | sort -t- -k2,2n -k3,3n -k4,4n | tail -n 1 | sed 's/linux-\(.*\)\.tar\.xz/\1/') fi - - install -d kernel echo "https://cdn.kernel.org/pub/linux/kernel/v$KSER/linux-$KVER.tar.xz" curl -s https://cdn.kernel.org/pub/linux/kernel/v$KSER/linux-$KVER.tar.xz | tar -C kernel --strip-components=1 -xJ make -C kernel CC=${CC:=gcc} defconfig