From a5405baec6a3c10984d606c564500aea2325d7cd Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Jan 2019 21:20:14 +0200 Subject: [PATCH] packages: start work on bedrock support --- neofetch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neofetch b/neofetch index 497da49c..9e84fa59 100755 --- a/neofetch +++ b/neofetch @@ -1270,6 +1270,12 @@ get_packages() { pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; } tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; } + [[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]] && \ + tot() { + IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "${s}" "$@"; done) + ((packages+="${#pkgs[@]}")); pac "${#pkgs[@]}" + } + case "$os" in "Linux" | "BSD" | "iPhone OS" | "Solaris") # Package Manager Programs.