mirror of
https://github.com/macports/mpbb.git
synced 2026-03-31 14:38:29 -07:00
git-svn-id: https://svn.macports.org/repository/macports/contrib/mpab@81645 d073be05-634f-4543-b044-5fe20cf6d1d6
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
if [[ -z "$PORTLISTFILE" ]]; then
|
|
PORTLISTFILE=portlist
|
|
fi
|
|
if [[ -z "$PREFIX" ]]; then
|
|
PREFIX="/opt/local"
|
|
fi
|
|
if [[ -z "$STATUS_LOG" ]]; then
|
|
STATUS_LOG=portstatus.log
|
|
fi
|
|
|
|
|
|
rm -f $STATUS_LOG
|
|
failed=0
|
|
|
|
if [[ `head -n1 $PORTLISTFILE` == "all" ]]; then
|
|
ports=`${PREFIX}/bin/port -q echo all | tr '\n' ' '`
|
|
else
|
|
ports=`cat $PORTLISTFILE`
|
|
fi
|
|
|
|
for portname in $ports; do
|
|
if ls logs-*/success/${portname}.log > /dev/null 2>&1 ; then
|
|
echo "[OK] ${portname}" >> $STATUS_LOG
|
|
elif ls logs-*/fail/${portname}.log > /dev/null 2>&1 ; then
|
|
echo "[FAIL] ${portname}" >> $STATUS_LOG
|
|
let "failed = failed + 1"
|
|
# send email to appropriate places
|
|
portmaintainers=$(${PREFIX}/bin/port info --index --maintainers --line ${portname} | tr ',' ' ')
|
|
for maint in $portmaintainers; do
|
|
if [[ "$maint" != "nomaintainer@macports.org" && "$maint" != "openmaintainer@macports.org" ]]; then
|
|
# email maintainer
|
|
echo "not emailing $maint (not set up yet)"
|
|
fi
|
|
# also send to some new mailing list?
|
|
done
|
|
fi
|
|
done
|
|
exit $failed
|