]> gitweb.fluxo.info Git - trashman.git/commitdiff
Fix: trashman_distro: /etc/os-release support
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 1 Apr 2021 19:43:14 +0000 (16:43 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 1 Apr 2021 19:43:14 +0000 (16:43 -0300)
share/trashman/trashman/functions

index a29ab4f0a9c2872b27ca7f7d86ca4d3ac6eff179..4fbd24ceade08aaf510290c28e133955726e78ad 100644 (file)
@@ -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