#!/bin/sh DATESTR=$(date -u +%Y%m%d) cat < Gentoo Linux Security Announcments security Security 0.1 ${DATESTR} EOF /bin/ls -1 glsa*.xml | tail -n 10 | sort -r |while read glsa; do g=${glsa/.xml/} GLSA=${g:5} tag=title [ "${GLSA:0:4}" -le "2003" ] && tag=summary [ "${GLSA}" == "200312-07" ] && tag=title title=$(python get-glsa-info.py ${glsa} ${tag} 2>/dev/null) if [ "${tag}" == "title" ]; then synopsis=$(python get-glsa-info.py ${glsa} synopsis 2>/dev/null) else synopsis="$(python get-glsa-info.py ${glsa} description 2>/dev/null | head -c 72)" fi bugnum=$(python get-glsa-info.py ${glsa} bug 2>/dev/null) bug="Gentoo Bug ${bugnum}" cat < ${title}
${synopsis}
  GLSA ${GLSA}
  ${bug}
EOF done ; # for loop echo '
'