blob: b83facd0597b3d8bd1a708a2e8b4f6da1b4e6853 [file] [log] [blame]
david_williams51256372010-04-20 21:04:25 +00001#!/usr/bin/env bash
david_williams1ee5c5f2008-01-09 06:27:00 +00002
david_williamsddd91632008-01-09 06:29:21 +00003# it is assumed we are executing this in COMMON_PAGES or the parent of COMMON_PAGES
david_williamscf78c6e2008-01-09 06:29:56 +00004COMMON_PAGES=commonPages
david_williams1ee5c5f2008-01-09 06:27:00 +00005
6# This script file is to help get builds started "fresh", when
david_williamsddd91632008-01-09 06:29:21 +00007# the ${COMMON_PAGES} directory already exists on local file system.
8# While it is in the cvs repository in ${COMMON_PAGES}, it is
david_williams1ee5c5f2008-01-09 06:27:00 +00009# meant to be executed from the parent directory
david_williamsddd91632008-01-09 06:29:21 +000010# of ${COMMON_PAGES} on the file system.
david_williams1ee5c5f2008-01-09 06:27:00 +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.
14
15
david_williamsddd91632008-01-09 06:29:21 +000016if [ ! -e ${COMMON_PAGES} ]
david_williams1ee5c5f2008-01-09 06:27:00 +000017then
18 cd ..
david_williamsddd91632008-01-09 06:29:21 +000019 if [ ! -e ${COMMON_PAGES} ]
david_williams1ee5c5f2008-01-09 06:27:00 +000020 then
david_williamsddd91632008-01-09 06:29:21 +000021 echo "${COMMON_PAGES} does not exist as sub directory";
david_williams1ee5c5f2008-01-09 06:27:00 +000022 exit 1;
23 fi
24fi
25
26echo
27
david_williams29deb842008-01-13 07:42:42 +000028current=`pwd`
david_williams42c5be22008-01-09 20:17:35 +000029echo " removing all of ${COMMON_PAGES} from ${current} ..."
david_williamsafa0e2e2008-01-09 20:38:07 +000030rm -fr downloadsites
david_williamsddd91632008-01-09 06:29:21 +000031rm -fr ${COMMON_PAGES}/*
32rm -fr ${COMMON_PAGES}/.project
33rm -fr ${COMMON_PAGES}/.settings
34mkdir -p ${COMMON_PAGES}
david_williamsd3fe66b2008-01-09 20:52:40 +000035mkdir -p committers
david_williams1ee5c5f2008-01-09 06:27:00 +000036
david_williamsddd91632008-01-09 06:29:21 +000037echo " checking out head of ${COMMON_PAGES} from cvs ..."
david_williamsad761622008-01-09 20:37:16 +000038cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d downloadsites -r HEAD webtools.releng/downloadsites
david_williams1ee5c5f2008-01-09 06:27:00 +000039
david_williams2ee63202008-01-09 20:44:27 +000040echo " copying commonPages"
david_williamsd3fe66b2008-01-09 20:52:40 +000041cp -r downloadsites/webtools/commonPages/* ${COMMON_PAGES}
david_williams2ee63202008-01-09 20:44:27 +000042echo " copying artifacts to committers"
david_williamsd3fe66b2008-01-09 20:52:40 +000043cp -r downloadsites/webtools/artifacts/* committers
david_williams1ee5c5f2008-01-09 06:27:00 +000044
david_williams1ee5c5f2008-01-09 06:27:00 +000045echo
46