diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2019-09-25 18:50:00 +0300 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2019-09-25 18:50:00 +0300 |
| commit | 3bc621579a05c8a61e7aba71baca64a07ca9594a (patch) | |
| tree | da4aa061cc9ca629053320f4216d1903cd50c414 | |
| parent | 4e5bbb3944e4986602ad892fa91971d166d9f8bc (diff) | |
| download | pfetch-3bc621579a05c8a61e7aba71baca64a07ca9594a.tar.gz | |
netbsd: host information
| -rwxr-xr-x | pfetch | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -216,6 +216,22 @@ get_host() { host=$(sysctl -n hw.model) ;; + NetBSD*) + # Use 'set --' to store the output of the command + # as it normalizes whitespace and strips newlines. + # + # Disable the shellcheck warning for word-splitting + # as it's safe and intended ('set -f' disables globbing). + # shellcheck disable=2046 + { + set -f + set +f -- $(sysctl -n machdep.dmi.system-vendor \ + machdep.dmi.system-product) + } + + host=$* + ;; + *BSD*) # Use 'set --' to store the output of the command # as it normalizes whitespace and strips newlines. |
