pve-kernel-thunderx/scripts/check.sh
Fabian Mastenbroek 6ead8d7e6f
Fix shebang in update scripts
This change fixes the typo in the shebang of the update scripts.
2021-03-15 20:37:34 +01:00

14 lines
486 B
Bash
Executable file

#!/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)
NEW=$(curl -s https://www.kernel.org/releases.json | jq -r ".releases|sort_by(-.released.timestamp)|map(select(.version | startswith(\"$MAJOR\")))|first|.version")
if [[ "$(scripts/version.sh -p)" = "0" ]]; then
[[ "$(scripts/version.sh -n)" = "$NEW" ]] || echo $NEW
else
[[ "$CURRENT" = "$NEW" ]] || echo $NEW
fi