os: fixed lsb_release, closes #14
This commit is contained in:
parent
55b78b9e58
commit
68d2422a1b
6
pfetch
6
pfetch
|
@ -154,6 +154,12 @@ get_os() {
|
||||||
if command -v lsb_release; then
|
if command -v lsb_release; then
|
||||||
distro=$(lsb_release -sd)
|
distro=$(lsb_release -sd)
|
||||||
|
|
||||||
|
# lsb_release sometimes adds quotes around the output,
|
||||||
|
# this simply remove quotes from the start/end if they
|
||||||
|
# exist.
|
||||||
|
distro=${distro##\"}
|
||||||
|
distro=${distro%%\"}
|
||||||
|
|
||||||
else
|
else
|
||||||
# Disable warning about shellcheck not being able
|
# Disable warning about shellcheck not being able
|
||||||
# to read '/etc/os-release'. This is fine.
|
# to read '/etc/os-release'. This is fine.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user