#!/bin/sh -e
# List the plugins that have been autogenerated from an
# advisory


# Script location
DIR_PLUGINS=scripts
REMOVED_LIST=audit/REMOVED-PLUGINS

[ ! -d $DIR_PLUGINS ] && { echo "ERROR: Cannot find plugins directory ($DIR_PLUGINS)!" >&2 ; exit 1 ; }

# Check new plugins
for pluginfile in ${DIR_PLUGINS}/* ; do
    plugin=`basename $pluginfile`
    if  grep -q "Auto-generated from advisory" $pluginfile; then
        echo "$plugin"
    fi
done
    
