From 68d2422a1be06c99b5b97047cc2aaedc5be9f914 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Sep 2019 07:01:50 +0300 Subject: [PATCH] os: fixed lsb_release, closes #14 --- pfetch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pfetch b/pfetch index bd3dabb..20fcb81 100755 --- a/pfetch +++ b/pfetch @@ -154,6 +154,12 @@ get_os() { if command -v lsb_release; then 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 # Disable warning about shellcheck not being able # to read '/etc/os-release'. This is fine.