Commit e94a57c8 authored by Dylan Araps's avatar Dylan Araps

Misc: Fix some if empty tests

parent 29b7fd58
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment