Skip to content

Instantly share code, notes, and snippets.

@amoralej
Created November 27, 2020 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amoralej/eb1297873d75b6ad0e6b2bb46a68bd44 to your computer and use it in GitHub Desktop.
Save amoralej/eb1297873d75b6ad0e6b2bb46a68bd44 to your computer and use it in GitHub Desktop.
grep ^+ $1 |grep rpms|awk '{print $3}'| tr -d ':'|while read a
do
curl -s https://src.fedoraproject.org/api/0/$a|grep -q orphan
if [ $? -eq 0 ]; then
echo "$a orphaned"
else
curl -s https://src.fedoraproject.org/api/0/$a/tree/master/f/dead.package|grep -q EFILENOTFOUND
if [ $? -ne 0 ]; then
echo "$a removed"
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment