Remove: voidcheck.sh: Void Linux only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,93 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
notify="off" # Can be set to: on | off
|
|
||||||
|
|
||||||
NotifySwitch(){
|
|
||||||
|
|
||||||
if [ ${notify} = on ];then
|
|
||||||
notify-send """$1"""
|
|
||||||
elif [ "$notify" = off ];then
|
|
||||||
echo -e """$1"""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -f /usr/bin/rsstail ];then
|
|
||||||
|
|
||||||
|
|
||||||
feedcmd='rsstail -1 -u'
|
|
||||||
feed='https://github.com/void-linux/void-packages/commits/master.atom'
|
|
||||||
newpkgs='grep -e New -e new'
|
|
||||||
updatedpkgs='grep -e Update -e update'
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
-nc)
|
|
||||||
echo -e "Downloading feed info, please wait...\n"
|
|
||||||
getnew=$(${feedcmd} ${feed} | ${newpkgs} | wc -l)
|
|
||||||
NotifySwitch "There are ${getnew} new package commits in master\n"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-uc)
|
|
||||||
echo -e "Downloading feed info, please wait...\n"
|
|
||||||
getupdated=$(${feedcmd} ${feed} | ${updatedpkgs} | wc -l)
|
|
||||||
NotifySwitch "There are ${getupdated} updated package commits in master\n"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-ff)
|
|
||||||
getfull=$(${feedcmd} ${feed})
|
|
||||||
echo -e """${getfull}\n"""
|
|
||||||
;;
|
|
||||||
|
|
||||||
-n)
|
|
||||||
fullnew=$(${feedcmd} ${feed} | ${newpkgs})
|
|
||||||
echo """${fullnew}"""
|
|
||||||
;;
|
|
||||||
|
|
||||||
-u)
|
|
||||||
fullupdated=$(${feedcmd} ${feed} | ${updatedpkgs})
|
|
||||||
echo "${fullupdated}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-sc)
|
|
||||||
echo -e "Downloading feed info, please wait...\n"
|
|
||||||
getsys=$(xbps-install -Mnu 2>/dev/null | wc -l)
|
|
||||||
NotifySwitch "There are ${getsys} system updates available\n"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-r)
|
|
||||||
echo -e "Downloading feed info, please wait...\n"
|
|
||||||
|
|
||||||
getsys=$(xbps-install -Mnu 2>/dev/null | wc -l)
|
|
||||||
getnew=$(${feedcmd} ${feed} | ${newpkgs} | wc -l)
|
|
||||||
getupdated=$(${feedcmd} ${feed} | ${updatedpkgs} | wc -l)
|
|
||||||
|
|
||||||
NotifySwitch """
|
|
||||||
[ Void Checker Report ]
|
|
||||||
|
|
||||||
GIT COMMITS:
|
|
||||||
Updated Packages: ${getupdated}
|
|
||||||
New Packages: ${getnew}
|
|
||||||
|
|
||||||
SYSTEM UPDATES:
|
|
||||||
Currently Available: ${getsys}\n"""
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo """Usage: $0 -rn | -ru | -s | -a
|
|
||||||
|
|
||||||
-nc Show total number of new package commits in master
|
|
||||||
-uc Show total number of updated package commits in master
|
|
||||||
-u Output all updated packages in feed
|
|
||||||
-n Output all new packages in feed
|
|
||||||
-sc Show total number of available system updates
|
|
||||||
-r Show a summerized count of github and system update status"""
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
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
|
|
||||||
Reference in New Issue
Block a user