~xdavidwu/linux-xdavidwu-xps

e32f8df23c8e36e91373c7e02976c07385677cc5 — xdavidwu 2 years ago c8b0fff
checknupdate: add support for first patch
1 files changed, 1 insertions(+), 6 deletions(-)

M checknupdate.sh
M checknupdate.sh => checknupdate.sh +1 -6
@@ 4,7 4,7 @@ git pull --no-edit
VER=$(grep '^pkgver=' APKBUILD | cut -d '=' -f 2)
CURR_VERSION=$(echo $VER | cut -d '.' -f 1)
CURR_PATCHLEVEL=$(echo $VER | cut -d '.' -f 2)
CURR_SUBLEVEL=$(echo $VER | cut -d '.' -f 3)
CURR_SUBLEVEL=$(echo $VER.0 | cut -d '.' -f 3)
CURR_BRANCH=$CURR_VERSION.$CURR_PATCHLEVEL

VERSION=$(curl https://www.kernel.org/releases.json | jq -r '.releases[].version' | grep "^$CURR_VERSION\.$CURR_PATCHLEVEL\.")


@@ 22,11 22,6 @@ fi

if [ "$NEW_SUBLEVEL" -gt "$CURR_SUBLEVEL" ];then
	echo "Update: $CURR_BRANCH.$CURR_SUBLEVEL -> $CURR_BRANCH.$NEW_SUBLEVEL"
	#https://cdn.kernel.org/pub/linux/kernel/v4.x/incr/patch-4.17.5-6.xz
	if [ "$NEW_SUBLEVEL" -eq 1 ];then
		echo "Manual work required for first patch"
		exit 1
	fi
	sed "s/pkgver=$VER/pkgver=$CURR_BRANCH.$NEW_SUBLEVEL/" -i APKBUILD
	SED_ERRNO=$?
	abuild checksum && apkgrel -z APKBUILD