Skip to content

Commit

Permalink
Submitted by: jmpp@
Browse files Browse the repository at this point in the history
Initial checkin of the IndexRegen.sh script, currently taking care of the
automatic PortIndex regen on OpenDarwin servers, for wide access & hacking.

PS: The checkin of this file will be performed in steps for tracking purposes,
the current version being the one that's live now on Dulcinea, copying the regen'd
index directly to the rsync module (only, no CVS yet) serving client's dports/
tree through sync/selfupdate, twice a day.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@14468 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jmpalacios committed Oct 8, 2005
1 parent 4f1e624 commit a65d1bb
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/portmgr/IndexRegen.sh
@@ -0,0 +1,38 @@
#!/bin/bash


####
# PortIndex regen automation script.
# Created by Juan Manuel Palacios,
# e-mail: jmpp@opendarwin.org
# Date: 2005/10/2
####


PREFIX=/opt/local
PATH=/bin:/usr/bin:${PREFIX}/bin
DPORTS=${PREFIX}/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports
SU_OUT=/tmp/dpselfupdate.out
I_OUT=/tmp/portindex.out
FAILURES=/tmp/dp_index_failures.out
DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')
MAILTO=portmgr@opendarwin.org
RSYNC=/Volumes/bigsrc/darwinports/portindex/


cd ${DPORTS}
#port -d selfupdate > ${SU_OUT} 2>&1
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}
cp -f PortIndex ${RSYNC}
}
else
cat ${SU_OUT} | mail -s "Indexing Failure on ${DATE}" ${MAILTO}
fi

rm -f ${SU_OUT} ${IO_UT} ${FAILURES}

exit 0

0 comments on commit a65d1bb

Please sign in to comment.