aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2021-04-01 16:43:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2021-04-01 16:43:14 -0300
commite227b94ca9c3df5fdd6315bf2a2c10725dca0de4 (patch)
tree44a74055829bf3735f8f796a628fca3313449a6f
parent838babebe87f480961d6ad1b5be6bc2e529f9fed (diff)
downloadtrashman-e227b94ca9c3df5fdd6315bf2a2c10725dca0de4.tar.gz
trashman-e227b94ca9c3df5fdd6315bf2a2c10725dca0de4.tar.bz2
Fix: trashman_distro: /etc/os-release support
-rw-r--r--share/trashman/trashman/functions4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/trashman/trashman/functions b/share/trashman/trashman/functions
index a29ab4f..4fbd24c 100644
--- a/share/trashman/trashman/functions
+++ b/share/trashman/trashman/functions
@@ -33,7 +33,9 @@ trashman_family() {
trashman_distro() {
local uname="`trashman_family`"
- if [ "$uname" = "linux" ]; then
+ if [ -e "/etc/os-release" ]; then
+ grep "^ID=" /etc/os-release | cut -d '=' -f 2
+ elif [ "$uname" = "linux" ]; then
if [ -e "/etc/debian_version" ]; then
echo "debian"
else