#!/bin/bash
export LD_LIBRARY_PATH=/usr/local/mysql/lib/mysql
sleep 10
# =======================================================
# postbuild.sh usage:
#
# $1 = top (where src is)
# $2 = type (retail debug, or both)
# $3 = title (jobname)
# $4 = buildnumber (title.version+p4 change)
# =======================================================
export TOP=$1
export TYPE=$2
export TITLE=$3
export NUM=$4
export RTL=/mnt/dev/builds/$TITLE/$NUM
export CVSROOT=:pserver:build@source:/src
export SCRIPTS_DIR=$(pwd)
export BLDSVRDIR=$HOME/buildserver/server
export SHARED_DIR=$BLDSVRDIR/jobs/shared
cd $TOP
perl -I$BLDSVRDIR/lib $SHARED_DIR/gentoc.pl -f $RTL/bldcontents.html -n $TITLE
echo $NUM >/mnt/dev/builds/.$TITLE.lastgood
depend=`cat /mnt/dev/builds/.yosemite.depend`
#
# Remove anything generated from the build
#
perl -I$BLDSVRDIR/lib $SHARED_DIR/buildfuncs.pl removegenerated $TITLE &
perl -I$BLDSVRDIR/lib $SHARED_DIR/getlogs.pl slcdev28 $TITLE $NUM " Correlates with $depend or later."
perl -I$BLDSVRDIR/lib $SHARED_DIR/buildfuncs.pl removecomments
perl -I$BLDSVRDIR/lib $SHARED_DIR/log2html.pl -e $HOME/buildserver/server/config/$TITLE.errors -i $TOP/$TITLE.retail.log -o $RTL/build_log.html
cd $TOP