allow -rc in kernel version

Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2020-08-19 10:35:39 +02:00
parent a21a4b91ca
commit a72f73e0ec
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -6,7 +6,7 @@ CWD=$(pwd)
PRGNAM=$(basename $CWD)-$(hostname -s) PRGNAM=$(basename $CWD)-$(hostname -s)
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
BRANCH=${BRANCH:-mainline} # stable ; mainline BRANCH=${BRANCH:-stable} # stable ; mainline
ARCH=$(uname -m) ARCH=$(uname -m)
TAG=gwh TAG=gwh
@ -28,7 +28,7 @@ if [ $GIT == "YES" ]; then
git pull git pull
VERSION="$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" VERSION="$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)"
else else
VERSION=${VERSION:-$(curl https://www.kernel.org/feeds/kdist.xml | grep -o "[0-9.]*: $BRANCH" | head -n1 | cut -d: -f1)} VERSION=${VERSION:-$(curl https://www.kernel.org/feeds/kdist.xml | grep -o "[0-9.rc-]*: $BRANCH" | head -n1 | cut -d: -f1)}
SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v$(echo $VERSION | cut -d. -f1).x" SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v$(echo $VERSION | cut -d. -f1).x"
[ ! -e $CWD/linux-$VERSION.tar.?z* ] && wget -c "$SRC_URL/linux-$VERSION.tar.xz" -O $CWD/linux-$VERSION.tar.xz [ ! -e $CWD/linux-$VERSION.tar.?z* ] && wget -c "$SRC_URL/linux-$VERSION.tar.xz" -O $CWD/linux-$VERSION.tar.xz