From f28244ab477b1499588239db9b53464718dd2635 Mon Sep 17 00:00:00 2001 From: Tray Torrance Date: Thu, 2 Feb 2017 18:37:49 -0800 Subject: [PATCH] Add archlinux support to upgrade checker (cherry picked from commit 9d10ec617878b018274dd20800434b2d3d35add5) --- misc/upgrades-installed-check | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/upgrades-installed-check b/misc/upgrades-installed-check index 82c8e1b..36125f9 100755 --- a/misc/upgrades-installed-check +++ b/misc/upgrades-installed-check @@ -23,6 +23,13 @@ elif [ -e /etc/debian_version ]; then apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)" exit_code="$?" echo "$apt_get_upgrade_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" +elif [ -e /etc/arch-release ]; then + ## Archlinux + set -e + set -o pipefail + checkupdates_output="$(checkupdates 2>&1)" + exit_code="$?" + echo "$checkupdates_output" | grep '->' | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" else echo "Check not implemented for this distribution" >&2 exit 1