mirror of
https://github.com/dylanaraps/pfetch.git
synced 2026-01-02 16:02:12 +01:00
pfetch: more BSD support
This commit is contained in:
11
pfetch
11
pfetch
@@ -118,13 +118,22 @@ get_os() {
|
|||||||
*)
|
*)
|
||||||
# Catch all to ensure '$distro' is never blank.
|
# Catch all to ensure '$distro' is never blank.
|
||||||
# This should also handle the BSDs, macOS etc.
|
# This should also handle the BSDs, macOS etc.
|
||||||
distro=$os
|
distro="$os $kernel"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
get_kernel() {
|
get_kernel() {
|
||||||
|
# '$kernel' is the cached output of 'uname -r'.
|
||||||
|
case $os in
|
||||||
|
# Don't print kernel output on BSD system as the
|
||||||
|
# OS name includes it.
|
||||||
|
*BSD) ;;
|
||||||
|
|
||||||
|
*)
|
||||||
log kernel "$kernel"
|
log kernel "$kernel"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
get_host() {
|
get_host() {
|
||||||
|
|||||||
Reference in New Issue
Block a user