From 25324687b537f7ca84d690b051b62cb2c0d62f62 Mon Sep 17 00:00:00 2001 From: Daniel Thau Date: Fri, 6 Mar 2020 17:13:43 -0500 Subject: [PATCH] pfetch: Add support for Bedrock Bedrock mimics other distros. Part of doing so involves having distro identifiers such as /etc/os-release look like those from other distros. It must thus be special cased to be detected properly. Bedrock typically includes /bedrock/cross/* entries in its $PATH. However, they may be dropped as a hint to Bedrock-aware software that they should act as though they were not Bedrock aware. The $PATH check is thus used to have pfetch conditionally disable the Bedrock special casing even on Bedrock systems. pfetch package count detection fails to consider repeated instances of a given package manager. Correcting this for the Bedrock specific concern is purposefully eschewed for the sake of simplicity. It may be revisited later once Bedrock's Package Manager Manager ("pmm") feature stabilizes. --- pfetch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pfetch b/pfetch index 9175356..a1a380e 100755 --- a/pfetch +++ b/pfetch @@ -113,6 +113,9 @@ get_os() { # don't follow any os-release/lsb standards whatsoever. command -v crux && distro=$(crux) command -v guix && distro='Guix System' + case $PATH in + */bedrock/cross/*) distro='Bedrock Linux' + esac # Check to see if Linux is running in Windows 10 under # WSL1 (Windows subsystem for Linux [version 1]) and @@ -889,6 +892,15 @@ get_ascii() { EOF ;; + [Bb]edrock*) + read_ascii 4 <<-EOF + ${c7}__ + ${c7}\\ \\___ + ${c7} \\ _ \\ + ${c7} \\___/ + EOF + ;; + [Cc]ent[Oo][Ss]*) read_ascii 5 <<-EOF ${c2} ____${c3}^${c5}____