mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-18 01:47:12 +00:00
Misc: Fix some if empty tests
This commit is contained in:
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
|
||||||
|
|||||||
Reference in New Issue
Block a user