Quellcode durchsuchen

Merge remote-tracking branch 'origin/pr/240'

* origin/pr/240:
  package-managers: handle Gentoo
Marek Marczykowski-Górecki vor 4 Jahren
Ursprung
Commit
d0b699c59f
1 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 7 0
      package-managers/upgrades-installed-check

+ 7 - 0
package-managers/upgrades-installed-check

@@ -35,6 +35,13 @@ elif [ -e /etc/arch-release ]; then
     checkupdates_output="$(checkupdates 2>&1)"
     exit_code="$?"
     echo "$checkupdates_output" | grep -qF -- '->' && echo "false" || echo "true"
+elif [ -e /etc/gentoo-release ]; then
+    ## Gentoo
+    set -e
+    set -o pipefail
+    emerge_output="$(emerge -puDv @world 2>&1)"
+    exit_code="$?"
+    echo "$emerge_output" | grep -qF -- '[ebuild' && echo "false" || echo "true"
 else
     echo "Check not implemented for this distribution" >&2
     exit 1