openbsd: Show current

This commit is contained in:
Dylan Araps 2020-03-12 12:35:22 +02:00
parent 7503fcc37b
commit 6ce6b1a0f7
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

10
pfetch
View File

@ -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.