blob: be39f7636241cf9ddafc6d02dffcf8e66588977b [file] [log] [blame]
david_williams42f9b242006-11-27 18:45:14 +00001#!/bin/sh
david_williamsf618ce42006-11-19 18:46:17 +00002
david_williams53f9de12008-01-02 19:31:06 +00003# it is assumed we are executing this in RELENG_CONTROL or the parent of RELENG_CONTROL
david_williams2e0afe02008-01-02 04:11:40 +00004RELENG_CONTROL=releng.control
5
david_williams53f9de12008-01-02 19:31:06 +00006# This script file is to help get builds started "fresh", when
david_williams2e0afe02008-01-02 04:11:40 +00007# the ${RELENG_CONTROL} directory already exists on local file system.
david_williams53f9de12008-01-02 19:31:06 +00008# While it is in the cvs repository in ${RELENG_CONTROL}, it is
david_williams42f9b242006-11-27 18:45:14 +00009# meant to be executed from the parent directory
david_williams53f9de12008-01-02 19:31:06 +000010# of ${RELENG_CONTROL} on the file system.
david_williamsf618ce42006-11-19 18:46:17 +000011
12# export is used, instead of checkout, just to avoid the CVS directories and since this code
13# for a local build, there should never be a need to check it back in to CVS.
david_williamsf618ce42006-11-19 18:46:17 +000014
david_williamsc3f40892007-12-14 22:24:08 +000015
david_williams53f9de12008-01-02 19:31:06 +000016if [ ! -e ${RELENG_CONTROL} ]
david_williamsc3f40892007-12-14 22:24:08 +000017then
david_williams53f9de12008-01-02 19:31:06 +000018 cd ..
19 if [ ! -e ${RELENG_CONTROL} ]
david_williamsc3f40892007-12-14 22:24:08 +000020 then
david_williams2e0afe02008-01-02 04:11:40 +000021 echo "${RELENG_CONTROL} does not exist as sub directory";
david_williams3a8ba3d2007-12-14 22:49:29 +000022 exit 1;
david_williamsc3f40892007-12-14 22:24:08 +000023 fi
24fi
25
david_williams2e0afe02008-01-02 04:11:40 +000026echo
david_williamsd4b1fd32008-01-02 04:16:52 +000027echo " saving serialized CC state ..."
david_williams2e0afe02008-01-02 04:11:40 +000028cp ${RELENG_CONTROL}/*.ser . >/dev/null 2>/dev/null
david_williamsf618ce42006-11-19 18:46:17 +000029
david_williamsd4b1fd32008-01-02 04:16:52 +000030echo " removing all of ${RELENG_CONTROL} ..."
david_williams2e0afe02008-01-02 04:11:40 +000031rm -fr ${RELENG_CONTROL}/*
32rm -fr ${RELENG_CONTROL}/.project
david_williamscb53ae62008-01-02 19:46:33 +000033rm -fr ${RELENG_CONTROL}/.settings
david_williams2e0afe02008-01-02 04:11:40 +000034mkdir -p ${RELENG_CONTROL}
david_williamsf618ce42006-11-19 18:46:17 +000035
david_williamsedf01142010-03-03 05:33:01 +000036#controltag=david_williamd_tempTest23
david_williams4c0d8a32008-06-10 01:57:32 +000037controltag=HEAD
david_williamsa6f10f62008-06-08 06:59:00 +000038echo " checking out $controltag of ${RELENG_CONTROL} from cvs ..."
39cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ${RELENG_CONTROL} -r $controltag webtools.releng/${RELENG_CONTROL}
david_williamsf618ce42006-11-19 18:46:17 +000040
david_williamsd4b1fd32008-01-02 04:16:52 +000041echo " restoreing serialized CC state ..."
david_williams2e0afe02008-01-02 04:11:40 +000042mv *.ser ${RELENG_CONTROL} >/dev/null 2>/dev/null
david_williamsf618ce42006-11-19 18:46:17 +000043
david_williamseceb39b2008-01-02 04:21:44 +000044echo " making sure releng control files are executable and have proper EOL ..."
david_williams2e0afe02008-01-02 04:11:40 +000045dos2unix ${RELENG_CONTROL}/*.sh* ${RELENG_CONTROL}/*.properties ${RELENG_CONTROL}/*.xml >/dev/null 2>>/dev/null
46chmod +x ${RELENG_CONTROL}/*.sh > /dev/null
david_williams53f9de12008-01-02 19:31:06 +000047echo
david_williamsf618ce42006-11-19 18:46:17 +000048