From e94a57c8c40120a561bfc67ef6dea793c6b5e83d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 6 Nov 2016 20:46:41 +1100 Subject: [PATCH] Misc: Fix some if empty tests --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 0246a9be..269082d3 100755 --- a/neofetch +++ b/neofetch @@ -176,8 +176,8 @@ getdistro() { esac # Workarounds for distros that go against the os-release standard. - [ -z "$(trim "$distro")" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease /usr/lib/*ease)" - [ -z "$(trim "$distro")" ] && distro="$(awk -F'=' '{print $2; exit}' /etc/*ease /usr/lib/*ease)" + [ -z "${distro// }" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease /usr/lib/*ease)" + [ -z "${distro// }" ] && distro="$(awk -F'=' '{print $2; exit}' /etc/*ease /usr/lib/*ease)" fi distro="${distro//\"}" distro="${distro//\'}" @@ -2363,7 +2363,7 @@ info() { unset prin && return # If the output is empty, don't print anything. - [ -z "$output" ] && \ + [ -z "${output// }" ] && \ err "Info: Couldn't detect $subtitle" && return case "$1" in