david_williams | 5125637 | 2010-04-20 21:04:25 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 2 | |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 3 | # it is assumed we are executing this in COMMON_PAGES or the parent of COMMON_PAGES |
david_williams | cf78c6e | 2008-01-09 06:29:56 +0000 | [diff] [blame] | 4 | COMMON_PAGES=commonPages |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 5 | |
| 6 | # This script file is to help get builds started "fresh", when |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 7 | # the ${COMMON_PAGES} directory already exists on local file system. |
| 8 | # While it is in the cvs repository in ${COMMON_PAGES}, it is |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 9 | # meant to be executed from the parent directory |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 10 | # of ${COMMON_PAGES} on the file system. |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 11 | |
| 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_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 16 | if [ ! -e ${COMMON_PAGES} ] |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 17 | then |
| 18 | cd .. |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 19 | if [ ! -e ${COMMON_PAGES} ] |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 20 | then |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 21 | echo "${COMMON_PAGES} does not exist as sub directory"; |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 22 | exit 1; |
| 23 | fi |
| 24 | fi |
| 25 | |
| 26 | echo |
| 27 | |
david_williams | 29deb84 | 2008-01-13 07:42:42 +0000 | [diff] [blame] | 28 | current=`pwd` |
david_williams | 42c5be2 | 2008-01-09 20:17:35 +0000 | [diff] [blame] | 29 | echo " removing all of ${COMMON_PAGES} from ${current} ..." |
david_williams | afa0e2e | 2008-01-09 20:38:07 +0000 | [diff] [blame] | 30 | rm -fr downloadsites |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 31 | rm -fr ${COMMON_PAGES}/* |
| 32 | rm -fr ${COMMON_PAGES}/.project |
| 33 | rm -fr ${COMMON_PAGES}/.settings |
| 34 | mkdir -p ${COMMON_PAGES} |
david_williams | d3fe66b | 2008-01-09 20:52:40 +0000 | [diff] [blame] | 35 | mkdir -p committers |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 36 | |
david_williams | ddd9163 | 2008-01-09 06:29:21 +0000 | [diff] [blame] | 37 | echo " checking out head of ${COMMON_PAGES} from cvs ..." |
david_williams | ad76162 | 2008-01-09 20:37:16 +0000 | [diff] [blame] | 38 | cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d downloadsites -r HEAD webtools.releng/downloadsites |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 39 | |
david_williams | 2ee6320 | 2008-01-09 20:44:27 +0000 | [diff] [blame] | 40 | echo " copying commonPages" |
david_williams | d3fe66b | 2008-01-09 20:52:40 +0000 | [diff] [blame] | 41 | cp -r downloadsites/webtools/commonPages/* ${COMMON_PAGES} |
david_williams | 2ee6320 | 2008-01-09 20:44:27 +0000 | [diff] [blame] | 42 | echo " copying artifacts to committers" |
david_williams | d3fe66b | 2008-01-09 20:52:40 +0000 | [diff] [blame] | 43 | cp -r downloadsites/webtools/artifacts/* committers |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 44 | |
david_williams | 1ee5c5f | 2008-01-09 06:27:00 +0000 | [diff] [blame] | 45 | echo |
| 46 | |