diff --git a/security/vuxml/files/newentry.sh b/security/vuxml/files/newentry.sh index 07d4cfec25fd..953d9dcd11e4 100644 --- a/security/vuxml/files/newentry.sh +++ b/security/vuxml/files/newentry.sh @@ -1,62 +1,63 @@ #! /bin/sh vuxml_file="$1" if [ -z "${vuxml_file}" ]; then exec >&2 echo "Usage: newentry.sh /path/to/vuxml/document" exit 1 fi tmp="`mktemp ${TMPDIR:-/tmp}/vuxml.XXXXXXXXXX`" || exit 1 doclean="yes" cleanup() { if [ "${doclean}" = "yes" ]; then rm -f "${tmp}" fi } trap cleanup EXIT 1 2 13 15 vid="`uuidgen | tr '[:upper:]' '[:lower:]'`" [ -z "$vid" ] && exit 1 discovery="`date -u '+%Y-%m'`-FIXME" || exit 1 entry="`date -u '+%Y-%m-%d'`" || exit 1 awk '/^<\?/,/^> "${tmp}" || exit 1 cat << EOF >> "${tmp}" || exit 1 --

SO-AND-SO reports:

.

+ INSERT CVE RECORD IF AVAILABLE INSERT BLOCKQUOTE URL HERE ${discovery} ${entry}
EOF awk '/^[[:space:]]+> "${tmp}" || exit 1 if cp "${tmp}" "${vuxml_file}"; then exec ${EDITOR:-vi} "${vuxml_file}" else doclean="no" exec >&2 echo "Could not overwrite \`${vuxml_file}'." echo "Results are left in \`${tmp}'." exit 1 fi