mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-11-25 20:28:17 +00:00
Check for os-release in /etc and /usr/lib
This commit is contained in:
1 parent
0ac1b7d216
commit
5dd087585c
1 file changed
+6
-2
@@ -19,8 +19,12 @@ _() { # [ a = b ] with globbing
|
|||||||
[ "$DESKTOP_SESSION" ] && wm="$DESKTOP_SESSION"
|
[ "$DESKTOP_SESSION" ] && wm="$DESKTOP_SESSION"
|
||||||
|
|
||||||
## Distro
|
## Distro
|
||||||
o=/etc/os-release
|
# freedesktop.org/software/systemd/man/os-release.html
|
||||||
[ -f $o ] && . $o # a common file that has variables about the distro
|
# 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
|
if [ -e /proc/$$/comm ]; then
|
||||||
while [ ! "$term" ]; do
|
while [ ! "$term" ]; do
|
||||||
|
|||||||
Reference in new issue
Block a user