aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdotfiles/.local/bin/kernelchlog16
1 files changed, 16 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/kernelchlog b/dotfiles/.local/bin/kernelchlog
new file mode 100755
index 0000000..05c5da5
--- /dev/null
+++ b/dotfiles/.local/bin/kernelchlog
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Very simple script to display the changelog for a kernel version in the
+# terminal.
+# If no arguments are passed, the changelog for the currently loaded kernel is
+# displayed.
+
+version=$1
+
+if [ -z $1 ]; then
+ version=$(uname -r | awk -F '-' '{ print $1 }')
+fi
+
+major=$(echo $version | awk -F '.' '{ print $1 }')
+
+curl "https://cdn.kernel.org/pub/linux/kernel/v$major.x/ChangeLog-$version" | less