blob: 543a8d6a4ac4e91dd367fab24d9a8de965deebcd [file] [log] [blame]
david_williams47f61222007-02-10 18:50:15 +00001#!/bin/sh
2
3# script to run update, setting properties, for all projects
4
david_williamsed5201c2007-05-27 05:48:38 +00005
david_williamsdb9a9592008-06-13 05:32:49 +00006function usage() {
7 printf "\n\tUsage: %s [-h] | [-v] [-c] -s stream" $(basename $0) >&2
8 printf "\n\t\t%s\n\n" "where h==help, v==verbose, c==clean and s==stream, where steam is GANYMEDE, etc" >&2
9}
10
11clean=
12stream=
13buildrepositorypath=
14while getopts 'hvc:' OPTION
15do
16 case $OPTION in
17 h) usage
18 exit 1
19 ;;
20 v) clean=1
21 ;;
22 b) stream=$OPTARG
23 ;;
24 ?) usage
25 exit 2
26 ;;
27 esac
28done
29
30shift $(($OPTIND - 1))
31
32if [ -z $BUILD_INITIALIZED ]
33then
34 source properties.shsource
35 source parseSiteArg.shsource $stream
36 export BUILD_INITIALIZED=1
37fi
38
39
40if [ $clean ] ; then
david_williams47f61222007-02-10 18:50:15 +000041
david_williams72901652008-05-28 04:30:46 +000042 echo " Removing ${testUpdateSite}/features/"
43 rm -fr ${testUpdateSite}/features/
david_williams47f61222007-02-10 18:50:15 +000044
david_williams72901652008-05-28 04:30:46 +000045 echo " Removing ${testUpdateSite}/plugins/"
46 rm -fr ${testUpdateSite}/plugins/
david_williams47f61222007-02-10 18:50:15 +000047
48 echo " Removing index and site xml files"
david_williams72901652008-05-28 04:30:46 +000049 rm -fr ${testUpdateSite}/*
david_williams8015a282008-02-24 22:21:58 +000050
david_williams843da282007-05-26 20:58:37 +000051fi
david_williams8015a282008-02-24 22:21:58 +000052
53 echo " Updating index and web site files, but not site xml files (yet)"
david_williams72901652008-05-28 04:30:46 +000054 rsync -pua ${HOME}/${updateToolsDir}/WebContent/${mainIndexFileName} ${testUpdateSite}/index.html
55 rsync -pua ${HOME}/${updateToolsDir}/WebContent/*.jpg ${testUpdateSite}
david_williams8015a282008-02-24 22:21:58 +000056
david_williamsdb9a9592008-06-13 05:32:49 +000057./createMirrorFile.sh "$@"
david_williams77285892008-06-12 03:25:57 +000058
david_williams28659b22008-06-12 03:48:43 +000059if [ "$?" -ne "0" ]
60then
61 exit $?
62fi
63
david_williamsdb911a72008-06-11 15:34:10 +000064./ant.sh -f ${fileListFile} -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
david_williams47f61222007-02-10 18:50:15 +000065
david_williams1672c662008-05-28 06:06:53 +000066echo
67echo " merge authored site.xml files with the most recent auto generated one"
david_williams406ce422008-06-12 04:22:39 +000068echo " mainSiteFileName: " ${mainSiteFileName}
69echo " testUpdateSite: " ${testUpdateSite}
david_williamsefd0ee62008-05-28 06:17:53 +000070./runUpdateSiteXmlFiles.sh ${mainSiteFileName} ${testUpdateSite}
david_williams1672c662008-05-28 06:06:53 +000071echo
david_williams47f61222007-02-10 18:50:15 +000072
david_williams843da282007-05-26 20:58:37 +000073# do create pack's later ... takes a long time
david_williamsdb911a72008-06-11 15:34:10 +000074# ./ant.sh -f createPack200s.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
david_williams33b8c382007-05-25 05:41:33 +000075
david_williams843da282007-05-26 20:58:37 +000076# run create Digests now, it's a good check if all is well
david_williamsdb911a72008-06-11 15:34:10 +000077./ant.sh -f createDigests.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}
david_williams60d00142008-05-28 02:32:50 +000078
79# create P2 repository metadata
david_williamsdb911a72008-06-11 15:34:10 +000080./ant.sh -f createP2Repo.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${testUpdateSite}