diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2020-03-12 12:35:22 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2020-03-12 12:35:22 +0200 |
| commit | 6ce6b1a0f7e438faf4a8578fde201630dea8926a (patch) | |
| tree | cf4eb0d7b0cca2f90a8f036e1de45db4ac0cc106 | |
| parent | 7503fcc37bd78f1a5080ea2b46f79239d8bd69fb (diff) | |
| download | pfetch-6ce6b1a0f7e438faf4a8578fde201630dea8926a.tar.gz | |
openbsd: Show current
| -rwxr-xr-x | pfetch | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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. |
