fix archlinux detection of available upgrades

note: checkupdates return 2 when no updates are available
(source: man page and source code)
このコミットが含まれているのは:
Ludovic Bellier 2020-11-28 23:54:56 +01:00
コミット 7faa707d26
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 552BC8B26E38D080

ファイルの表示

@ -34,7 +34,8 @@ elif [ -e /etc/arch-release ]; then
set -o pipefail
checkupdates_output="$(checkupdates 2>&1)"
exit_code="$?"
echo "$checkupdates_output" | grep -qF -- '->' && echo "false" || echo "true"
[ "$exit_code" -eq 2 ] && echo "true" && exit 0
echo "false"
elif [ -e /etc/gentoo-release ]; then
## Gentoo
set -e