aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/kernelchlog
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-05-06 10:30:47 +0300
committerYaroslav <contact@yaroslavps.com>2020-05-06 10:30:47 +0300
commit0678519d74f5a65a2286f453b102d6561b2840de (patch)
tree6f104c7c7fb217e8f3c91697cdd8978992931b82 /dotfiles/.local/bin/kernelchlog
parent8eba42952e4c654092a48c9778d56ad9aff81ef2 (diff)
downloadswayrice-0678519d74f5a65a2286f453b102d6561b2840de.tar.gz
swayrice-0678519d74f5a65a2286f453b102d6561b2840de.zip
smol script to list kernel version changelog in terminal
Diffstat (limited to 'dotfiles/.local/bin/kernelchlog')
-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