| #!/usr/bin/env bash |
| |
| # it is assumed we are executing this in RELENG_CONTROL or the parent of RELENG_CONTROL |
| RELENG_CONTROL=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} ] |
| then |
| cd .. |
| if [ ! -e ${RELENG_CONTROL} ] |
| then |
| echo "${RELENG_CONTROL} does not exist as sub directory"; |
| exit 1; |
| fi |
| fi |
| |
| echo |
| 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} |
| |
| #controltag=david_williamd_tempTest23 |
| controltag=HEAD |
| echo " checking out $controltag of ${RELENG_CONTROL} from cvs ..." |
| cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ${RELENG_CONTROL} -r $controltag 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 |
| echo |
| |