Add archlinux support to upgrade checker
(cherry picked from commit 9d10ec617878b018274dd20800434b2d3d35add5)
This commit is contained in:
parent
5daf11bf97
commit
f28244ab47
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user