blob: 6fd1ab748c68d51add986018a4e49d0cbaa36e16 [file] [log] [blame]
# it is assumed we are executing this in RELENG_CONTROL or the parent of RELENG_CONTROL
# This script file is to help get builds started "fresh", when
# the ${RELENG_CONTROL} directory already exists on local file system.
# While it is in the cvs repository in ${RELENG_CONTROL}, it is
# meant to be executed from the parent directory
# of ${RELENG_CONTROL} on the file system.
# export is used, instead of checkout, just to avoid the CVS directories and since this code
# for a local build, there should never be a need to check it back in to CVS.
if [ ! -e ${RELENG_CONTROL} ]
cd ..
if [ ! -e ${RELENG_CONTROL} ]
echo "${RELENG_CONTROL} does not exist as sub directory";
exit 1;
echo " saving serialized CC state ..."
cp ${RELENG_CONTROL}/*.ser . >/dev/null 2>/dev/null
echo " removing all of ${RELENG_CONTROL} ..."
rm -fr ${RELENG_CONTROL}/*
rm -fr ${RELENG_CONTROL}/.project
rm -fr ${RELENG_CONTROL}/.settings
mkdir -p ${RELENG_CONTROL}
echo " checking out head of ${RELENG_CONTROL} from cvs ..."
cvs -Q -f -d export -d ${RELENG_CONTROL} -r HEAD webtools.releng/${RELENG_CONTROL}
echo " restoreing serialized CC state ..."
mv *.ser ${RELENG_CONTROL} >/dev/null 2>/dev/null
echo " making sure releng control files are executable and have proper EOL ..."
dos2unix ${RELENG_CONTROL}/*.sh* ${RELENG_CONTROL}/*.properties ${RELENG_CONTROL}/*.xml >/dev/null 2>>/dev/null
chmod +x ${RELENG_CONTROL}/*.sh > /dev/null