New Script: Voidrepo-check

This commit is contained in:
mollusk 2016-07-05 22:15:19 -07:00
parent 58ea883d03
commit 3873b3f778

30
voidrepo-check.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
if [ -f /usr/bin/rsstail ];then
feed="https://github.com/voidlinux/void-packages/commits/master.atom"
updatedpkgs="$(rsstail -1 -u ${feed} | grep -e "Update" -e "update" | wc -l)"
newpkgs="$(rsstail -1 -u ${feed} | grep -e "New" -e "new" | wc -l)"
sysupdates="$(xbps-install -Snu | wc -l)"
notify-send """REPO COMMITS:
Updated Packages: ${updatedpkgs}
New Packages: ${newpkgs}
SYSTEM UPDATES:
Currently Available: ${sysupdates}"""
echo """REPO COMMITS:
Updated Packages: ${updatedpkgs}
New Packages: ${newpkgs}
SYSTEM UPDATES:
Currently Available: ${sysupdates}"""
elif [ ! -f /usr/bin/rsstail ];then
echo "[ERROR] This script requires the package: 'rsstail'"
exit 0;
else
echo "Something went wrong when checking for: /usr/bin/rsstail"
exit 0;
fi