-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaurcheck
More file actions
executable file
·36 lines (28 loc) · 895 Bytes
/
Copy pathaurcheck
File metadata and controls
executable file
·36 lines (28 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
AURDIR=/home/mike/abs/
PACC='\e[0;35m'
VERS='\e[0;34m'
SNCC='\e[0;32m'
OUTC='\e[0;31m'
RELC='\e[0m'
SITE="http://aur.archlinux.org/rpc.php?type=info&arg="
AURSITE="https://aur.archlinux.org/packages.php?ID="
cd $AURDIR
for i in *; do
if [ -d $i ]; then
if [ ! -f $i/SKIP ]; then
AURDATA=$(wget -q "${SITE}${i}" -O -)
AURV=$(echo "${AURDATA}" |sed -r 's#.*"[Vv]ersion":[ "]*([^",]*).*#\1#g')
AURID=$(echo "${AURDATA}" |sed -r 's#.*"[Ii][Dd]":[ "]*([^",]*).*#\1#g')
LOCAL=$(pacman -Q $i | awk '{print $2}')
if [ ${AURV} = ${LOCAL} ]; then
echo -en "Package ${PACC}$i${RELC} is ${SNCC}in sync${RELC} with AUR\n"
else
echo -en "Package ${PACC}$i${RELC} is ${OUTC} out of sync${RELC} with AUR\n"
fi
echo -en "\tLocal:\t $VERS$LOCAL$RELC\n"
echo -en "\tAUR:\t $VERS$AURV$RELC\n"
echo -en "\tSite: ${AURSITE}${AURID}\n\n"
fi
fi
done