diff --git a/src/portmgr/IndexRegen.sh b/src/portmgr/IndexRegen.sh index 7316485168..40511522c8 100755 --- a/src/portmgr/IndexRegen.sh +++ b/src/portmgr/IndexRegen.sh @@ -15,6 +15,7 @@ DPORTS=${PREFIX}/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dport SU_OUT=/tmp/dpselfupdate.out I_OUT=/tmp/portindex.out FAILURES=/tmp/dp_index_failures.out +LOG=/tmp/regen.out DATE=$(date +'%A %Y-%m-%d at %H:%M:%S') MAILTO=portmgr@opendarwin.org RSYNC=/Volumes/bigsrc/darwinports/portindex/ @@ -25,14 +26,16 @@ cd ${DPORTS} port -d sync > ${SU_OUT} 2>&1 if [ $? == 0 ]; then { rm -f PortIndex && portindex | tee ${I_OUT} | grep -A2 Failed > ${FAILURES} - { cat ${FAILURES}; tail -n 5 ${I_OUT}; } | mail -s "Indexing Run on ${DATE}" ${MAILTO} + { cat ${FAILURES}; tail -n 5 ${I_OUT}; } > ${LOG} cp -f PortIndex ${RSYNC} + cvs ci -F ${LOG} PortIndex + cat ${LOG} | mail -s "Indexing Run on ${DATE}" ${MAILTO} } else cat ${SU_OUT} | mail -s "Indexing Failure on ${DATE}" ${MAILTO} fi -rm -f ${SU_OUT} ${IO_UT} ${FAILURES} +rm -f ${SU_OUT} ${IO_UT} ${FAILURES} ${LOG} exit 0