summarylogtreecommitdiffstats
path: root/checkupdates+aur.bash
blob: 51a1ffd42e50a3fca404774404d2112df3e7f0a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/bash
/usr/bin/checkupdates
pac_updates=$?

printf "$1"

aur_output=$(checkupdates-aur)
printf "$aur_output"

if [[ $aur_output ]]; then
	aur_updates=0
else
	aur_updates=2
fi

if [ $pac_updates -eq 2 ] && [ $aur_updates -eq 2 ]; then
	exit 2
elif [ $pac_updates -eq 0 ] || [ $aur_updates -eq 0 ]; then
	exit 0
else
	exit 1
fi