blob: 172e3262c1aa9e1d40d3d74b9fc6e8fde6b2720a [file] [log] [blame]
david_williams7a915b32008-06-13 14:04:27 +00001#!/bin/sh
2
3# script to run update, setting properties, for all projects
4
5function usage() {
6 printf "\n\tUsage: %s [-h] | [-v] [-c] -s stream [-t | -m | -r]" $(basename $0) >&2
7 printf "\n\t\t%s" "where "
8 printf "\n\t\t\t%s\t%s" "-h" "help" >&2
9 printf "\n\t\t\t%s\t%s" "-v" "verbose" >&2
10 printf "\n\t\t\t%s\t%s" "-c" "clean" >&2
11 printf "\n\t\t\t%s\t%s" "-s" "steam" >&2
david_williamse4127122008-06-13 15:53:11 +000012 printf "\n\t\t\t\t\t%s" "where stream is Ganymede, Europa, etc" >&2
13 printf "\n\t\t\t%s\t%s" "-t" "use the temp test update site for this stream" >&2
14 printf "\n\t\t\t%s\t%s" "-m" "use the milestone update site for this stream" >&2
15 printf "\n\t\t\t%s\t%s" "-r" "use the release update site for this stream" >&2
david_williams05005ea2008-06-13 15:03:17 +000016 printf "\n\n" >&2
david_williams7a915b32008-06-13 14:04:27 +000017}
18
david_williams54b56bb2008-06-13 15:42:55 +000019 source properties.shsource
20
david_williams7a915b32008-06-13 14:04:27 +000021verbose=
22clean=
23stream=
24toUpdateSite=
25while getopts 'hvcs:tmr' OPTION
26do
27 case $OPTION in
28 h) usage
29 exit 1
30 ;;
31 v) export verbose=1
32 ;;
33 c) export clean=1
34 ;;
35 s) stream=$OPTARG
david_williams54b56bb2008-06-13 15:42:55 +000036 source parseSiteArg.shsource $stream
david_williams7a915b32008-06-13 14:04:27 +000037 ;;
38 t) toUpdateSite=${testUpdateSite}
39 ;;
40 m) toUpdateSite=${milestoneDirectory}
41 ;;
42 r) toUpdateSite=${releaseDir}
david_williams9e307ed2008-06-13 14:09:30 +000043 ;;
david_williams7a915b32008-06-13 14:04:27 +000044 ?) usage
45 exit 2
46 ;;
47 esac
48done
49
50shift $(($OPTIND - 1))
51
52if [ -z $stream ]
53then
54 echo ""
55 echo " Need a stream argument"
56 usage
57 exit 1
58fi
59
60if [ -z $toUpdateSite ]
61then
62 echo ""
63 echo " Need a toUpdateSite argument"
64 usage
65 exit 1
66fi
67
david_williamse4127122008-06-13 15:53:11 +000068if [ verbose ]
69then
70 printf "\n\tstream: " "${stream}" >&2
71 printf "\n\tto spdate site: : " "${toUpdateSite}" >&2
72
73fi
74
david_williams54b56bb2008-06-13 15:42:55 +000075export BUILD_INITIALIZED=1
david_williams7a915b32008-06-13 14:04:27 +000076
77./ant.sh -f createPack200s.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${toUpdateSite}
78