Generalize the packge building scripts to be able to be run on more than

one 'head' node, rather than just pointyhat itself.

Constants are factored out into installation-specific files known as
portbuild/conf/server.conf and portbuild/conf/client.conf.  There is
only one server.conf file.  Individual <arch> directories may have
their own client.conf files, or may symlink to ../conf/client.conf.

While here, fix error messages displayed on new runs.

Feature safe:	yes
This commit is contained in:
Mark Linimon 2010-06-25 23:31:11 +00:00
parent b88965abda
commit 5b3b7d003e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=256995

View file

@ -6,8 +6,10 @@ arch=$1
branch=$2
pb=/var/portbuild
. ${pb}/conf/server.conf
of=/usr/local/www/data/errorlogs/.${arch}-${branch}-failure.html
ERRORLOGS_DIRECTORY="${WWW_DIRECTORY}/errorlogs"
of=${ERRORLOGS_DIRECTORY}/.${arch}-${branch}-failure.html
cd ${pb}/${arch}/${branch}
@ -16,7 +18,10 @@ if [ -e .newfailure.stamp -a $(echo $(find . -maxdepth 1 -newer .newfailure.stam
touch .newfailure.stamp
newfailure=${pb}/${arch}/${branch}/newfailure
num=$(wc -l ${newfailure} | awk '{print $1}')
num=0
if [ -e ${newfailure} ]; then
num=$(wc -l ${newfailure} | awk '{print $1}')
fi
header() {
echo "<html><head><title>New package building errors</title>" >$of
@ -75,4 +80,4 @@ while read dir name ver date last count; do
echo "</tr>" >> $of
done < newfailure
footer ""
mv -f $of /usr/local/www/data/errorlogs/${arch}-${branch}-failure.html
mv -f $of ${ERRORLOGS_DIRECTORY}/${arch}-${branch}-failure.html