david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 1 | #!/bin/sh |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 2 | |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 3 | # it is assumed we are executing this in RELENG_CONTROL or the parent of RELENG_CONTROL |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 4 | RELENG_CONTROL=releng.control |
| 5 | |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 6 | # This script file is to help get builds started "fresh", when |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 7 | # the ${RELENG_CONTROL} directory already exists on local file system. |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 8 | # While it is in the cvs repository in ${RELENG_CONTROL}, it is |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 9 | # meant to be executed from the parent directory |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 10 | # of ${RELENG_CONTROL} on the file system. |
david_williams | f618ce4 | 2006-11-19 18:46:17 +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. |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 14 | |
david_williams | c3f4089 | 2007-12-14 22:24:08 +0000 | [diff] [blame] | 15 | |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 16 | if [ ! -e ${RELENG_CONTROL} ] |
david_williams | c3f4089 | 2007-12-14 22:24:08 +0000 | [diff] [blame] | 17 | then |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 18 | cd .. |
| 19 | if [ ! -e ${RELENG_CONTROL} ] |
david_williams | c3f4089 | 2007-12-14 22:24:08 +0000 | [diff] [blame] | 20 | then |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 21 | echo "${RELENG_CONTROL} does not exist as sub directory"; |
david_williams | 3a8ba3d | 2007-12-14 22:49:29 +0000 | [diff] [blame] | 22 | exit 1; |
david_williams | c3f4089 | 2007-12-14 22:24:08 +0000 | [diff] [blame] | 23 | fi |
| 24 | fi |
| 25 | |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 26 | echo |
david_williams | d4b1fd3 | 2008-01-02 04:16:52 +0000 | [diff] [blame] | 27 | echo " saving serialized CC state ..." |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 28 | cp ${RELENG_CONTROL}/*.ser . >/dev/null 2>/dev/null |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 29 | |
david_williams | d4b1fd3 | 2008-01-02 04:16:52 +0000 | [diff] [blame] | 30 | echo " removing all of ${RELENG_CONTROL} ..." |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 31 | rm -fr ${RELENG_CONTROL}/* |
| 32 | rm -fr ${RELENG_CONTROL}/.project |
david_williams | cb53ae6 | 2008-01-02 19:46:33 +0000 | [diff] [blame] | 33 | rm -fr ${RELENG_CONTROL}/.settings |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 34 | mkdir -p ${RELENG_CONTROL} |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 35 | |
david_williams | d4b1fd3 | 2008-01-02 04:16:52 +0000 | [diff] [blame] | 36 | echo " checking out head of ${RELENG_CONTROL} from cvs ..." |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 37 | cvs -Q -f -d :pserver:anonymous@dev.eclipse.org:/cvsroot/webtools export -d ${RELENG_CONTROL} -r HEAD webtools.releng/${RELENG_CONTROL} |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 38 | |
david_williams | d4b1fd3 | 2008-01-02 04:16:52 +0000 | [diff] [blame] | 39 | echo " restoreing serialized CC state ..." |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 40 | mv *.ser ${RELENG_CONTROL} >/dev/null 2>/dev/null |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 41 | |
david_williams | eceb39b | 2008-01-02 04:21:44 +0000 | [diff] [blame] | 42 | echo " making sure releng control files are executable and have proper EOL ..." |
david_williams | 2e0afe0 | 2008-01-02 04:11:40 +0000 | [diff] [blame] | 43 | dos2unix ${RELENG_CONTROL}/*.sh* ${RELENG_CONTROL}/*.properties ${RELENG_CONTROL}/*.xml >/dev/null 2>>/dev/null |
| 44 | chmod +x ${RELENG_CONTROL}/*.sh > /dev/null |
david_williams | 53f9de1 | 2008-01-02 19:31:06 +0000 | [diff] [blame] | 45 | echo |
david_williams | f618ce4 | 2006-11-19 18:46:17 +0000 | [diff] [blame] | 46 | |