2020-11-12 16:26:52 +00:00
|
|
|
#1/bin/bash
|
|
|
|
# Script to check for new kernel release
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
MAJOR=$(echo $1 | sed -e "s/^v//" -e "s/\.[^.]*$//")
|
|
|
|
CURRENT=$(scripts/version.sh -L)
|
2021-02-24 09:53:13 +00:00
|
|
|
NEW=$(curl -s https://www.kernel.org/releases.json | jq -r ".releases|sort_by(-.released.timestamp)|map(select(.version | startswith(\"$MAJOR\")))|first|.version")
|
2020-11-12 16:26:52 +00:00
|
|
|
|
2021-02-18 12:51:07 +00:00
|
|
|
if [[ "$(scripts/version.sh -p)" = "0" ]]; then
|
|
|
|
[[ "$(scripts/version.sh -n)" = "$NEW" ]] || echo $NEW
|
|
|
|
else
|
|
|
|
[[ "$CURRENT" = "$NEW" ]] || echo $NEW
|
|
|
|
fi
|