blob: b11b1882380a22fe05eb83035407e5c94eca5796 [file] [log] [blame]
david_williams42f9b242006-11-27 18:45:14 +00001#!/bin/sh
david_williamsf618ce42006-11-19 18:46:17 +00002
david_williams2e0afe02008-01-02 04:11:40 +00003# it is assumed we are executing this in RELENG_CONTROL or the parent of RELENG_CONTROL
4RELENG_CONTROL=releng.control
5
david_williams42f9b242006-11-27 18:45:14 +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.
8# 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_williams2e0afe02008-01-02 04:11:40 +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_williams2e0afe02008-01-02 04:11:40 +000016if [ ! -e ${RELENG_CONTROL} ]
david_williamsc3f40892007-12-14 22:24:08 +000017then
18 cd ..
david_williams2e0afe02008-01-02 04:11:40 +000019 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
27echo " saving serialized CC state ..."
28cp ${RELENG_CONTROL}/*.ser . >/dev/null 2>/dev/null
david_williamsf618ce42006-11-19 18:46:17 +000029
david_williams2e0afe02008-01-02 04:11:40 +000030echo " removing all of ${RELENG_CONTROL} ..."
31rm -fr ${RELENG_CONTROL}/*
32rm -fr ${RELENG_CONTROL}/.project
33mkdir -p ${RELENG_CONTROL}
david_williamsf618ce42006-11-19 18:46:17 +000034
david_williams2e0afe02008-01-02 04:11:40 +000035echo " checking out head of ${RELENG_CONTROL} from cvs ..."
36cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ${RELENG_CONTROL} -r HEAD webtools.releng/${RELENG_CONTROL}
david_williamsf618ce42006-11-19 18:46:17 +000037
david_williams2e0afe02008-01-02 04:11:40 +000038echo " restore serialized CC state"
39mv *.ser ${RELENG_CONTROL} >/dev/null 2>/dev/null
david_williamsf618ce42006-11-19 18:46:17 +000040
david_williams2e0afe02008-01-02 04:11:40 +000041echo " make sure releng control files are executable and have proper EOL"
42dos2unix ${RELENG_CONTROL}/*.sh* ${RELENG_CONTROL}/*.properties ${RELENG_CONTROL}/*.xml >/dev/null 2>>/dev/null
43chmod +x ${RELENG_CONTROL}/*.sh > /dev/null
44echo
david_williamsf618ce42006-11-19 18:46:17 +000045