jitty-scripts/voidrepo-check.sh
2016-07-05 22:15:19 -07:00

31 lines
815 B
Bash
Executable File

#!/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