mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-23 12:09:55 +00:00
The get* functions now fallback to 'Unknown' instead of printing nothing
This commit is contained in:
12
fetch.sh
12
fetch.sh
@@ -212,6 +212,10 @@ getdistro () {
|
||||
"OpenBSD")
|
||||
distro="OpenBSD"
|
||||
;;
|
||||
|
||||
*)
|
||||
distro="Unknown"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -242,6 +246,10 @@ getuptime () {
|
||||
uptime=${uptime# }
|
||||
uptime="${uptime# * up }"
|
||||
;;
|
||||
|
||||
*)
|
||||
uptime="Unknown"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -285,7 +293,9 @@ getpackages () {
|
||||
packages=$(pkg_info | wc -l)
|
||||
;;
|
||||
|
||||
*) packages="Unknown" ;;
|
||||
*)
|
||||
packages="Unknown"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user