From e155df7a726177d2bbde55cbb7ddd6dd123ad69b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 7 Jan 2019 20:42:49 +0200 Subject: [PATCH] os: Initial support for Bedrock Linux --- neofetch | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 1eea1091..afd5f1e2 100755 --- a/neofetch +++ b/neofetch @@ -829,7 +829,12 @@ get_distro() { case "$os" in "Linux" | "BSD" | "MINIX") - if [[ -f "/etc/redstar-release" ]]; then + if [[ -f "/bedrock/etc/bedrock-release" ]] && [[ $PATH == */bedrock/cross/* ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="Bedrock Linux" ;; + *) distro="$(< /bedrock/etc/bedrock-release)" + esac + elif [[ -f "/etc/redstar-release" ]]; then case "$distro_shorthand" in "on" | "tiny") distro="Red Star OS" ;; *) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)" @@ -3431,6 +3436,7 @@ get_ascii() { # Calculate size of ascii file in line length / line count. while IFS=$'\n' read -r line; do + line="${line//\\\\/\\}" ((++lines,${#line}>ascii_len)) && ascii_len="${#line}" done <<< "${ascii_data//\$\{??\}}" @@ -5232,6 +5238,29 @@ ${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy EOF ;; + "Bedrock"*) + set_colors 0 7 + read -rd '' ascii_data <<'EOF' +${c1}-------------------------------------- +-------------------------------------- +-------------------------------------- +---${c2}\\\\\\\\\\\\\\\\\\\\\\\\${c1}----------------------- +----${c2}\\\\\\ \\\\\\${c1}---------------------- +-----${c2}\\\\\\ \\\\\\${c1}--------------------- +------${c2}\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\${c1}------ +-------${c2}\\\\\\ \\\\\\${c1}----- +--------${c2}\\\\\\ \\\\\\${c1}---- +---------${c2}\\\\\\ ______ \\\\\\${c1}--- +----------${c2}\\\\\\ ///${c1}--- +-----------${c2}\\\\\\ ///${c1}---- +------------${c2}\\\\\\ ///${c1}----- +-------------${c2}\\\\\\////////////////${c1}------ +-------------------------------------- +-------------------------------------- +-------------------------------------- +EOF + ;; + "Bitrig"*) set_colors 2 7 read -rd '' ascii_data <<'EOF'