From 5dd087585c9affbd60b29b2cfd661a01ab63a574 Mon Sep 17 00:00:00 2001 From: GaugeK Date: Sat, 22 Aug 2020 04:58:22 +1000 Subject: [PATCH] Check for os-release in /etc and /usr/lib --- fet.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fet.sh b/fet.sh index 6b22c8f..86425d9 100755 --- a/fet.sh +++ b/fet.sh @@ -19,8 +19,12 @@ _() { # [ a = b ] with globbing [ "$DESKTOP_SESSION" ] && wm="$DESKTOP_SESSION" ## Distro -o=/etc/os-release -[ -f $o ] && . $o # a common file that has variables about the distro +# freedesktop.org/software/systemd/man/os-release.html +# a common file that has variables about the distro +for os in /etc/os-release /usr/lib/os-release; do + # some POSIX shells exit when trying to source a file that doesn't exist + [ -f $os ] && . $os && break +done if [ -e /proc/$$/comm ]; then while [ ! "$term" ]; do