aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2020-03-12 12:35:22 +0200
committerDylan Araps <dylan.araps@gmail.com>2020-03-12 12:35:22 +0200
commit6ce6b1a0f7e438faf4a8578fde201630dea8926a (patch)
treecf4eb0d7b0cca2f90a8f036e1de45db4ac0cc106
parent7503fcc37bd78f1a5080ea2b46f79239d8bd69fb (diff)
downloadpfetch-6ce6b1a0f7e438faf4a8578fde201630dea8926a.tar.gz
openbsd: Show current
-rwxr-xr-xpfetch10
1 files changed, 10 insertions, 0 deletions
diff --git a/pfetch b/pfetch
index 94e5eb9..edfda88 100755
--- a/pfetch
+++ b/pfetch
@@ -274,6 +274,16 @@ get_os() {
IFS='(' read -r distro _ < /etc/release
;;
+ OpenBSD)
+ # Show the OpenBSD version type (current if present).
+ # kern.version=OpenBSD 6.6-current (GENERIC.MP) ...
+ IFS=' =' read -r _ distro openbsd_ver _ <<-EOF
+ $(sysctl kern.version)
+ EOF
+
+ distro="$distro $openbsd_ver"
+ ;;
+
*)
# Catch all to ensure '$distro' is never blank.
# This also handles the BSDs.