Misc: Fix some if empty tests
This commit is contained in:
parent
29b7fd589e
commit
e94a57c8c4
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -176,8 +176,8 @@ getdistro() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Workarounds for distros that go against the os-release standard.
|
# 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 "${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 -F'=' '{print $2; exit}' /etc/*ease /usr/lib/*ease)"
|
||||||
fi
|
fi
|
||||||
distro="${distro//\"}"
|
distro="${distro//\"}"
|
||||||
distro="${distro//\'}"
|
distro="${distro//\'}"
|
||||||
|
@ -2363,7 +2363,7 @@ info() {
|
||||||
unset prin && return
|
unset prin && return
|
||||||
|
|
||||||
# If the output is empty, don't print anything.
|
# If the output is empty, don't print anything.
|
||||||
[ -z "$output" ] && \
|
[ -z "${output// }" ] && \
|
||||||
err "Info: Couldn't detect $subtitle" && return
|
err "Info: Couldn't detect $subtitle" && return
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
Loading…
Reference in a new issue