david_williams | 7a915b3 | 2008-06-13 14:04:27 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # script to run update, setting properties, for all projects |
| 4 | |
| 5 | function 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_williams | e412712 | 2008-06-13 15:53:11 +0000 | [diff] [blame] | 12 | 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_williams | 05005ea | 2008-06-13 15:03:17 +0000 | [diff] [blame] | 16 | printf "\n\n" >&2 |
david_williams | 7a915b3 | 2008-06-13 14:04:27 +0000 | [diff] [blame] | 17 | } |
| 18 | |
david_williams | 54b56bb | 2008-06-13 15:42:55 +0000 | [diff] [blame] | 19 | source properties.shsource |
| 20 | |
david_williams | 7a915b3 | 2008-06-13 14:04:27 +0000 | [diff] [blame] | 21 | verbose= |
| 22 | clean= |
| 23 | stream= |
| 24 | toUpdateSite= |
| 25 | while getopts 'hvcs:tmr' OPTION |
| 26 | do |
| 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_williams | 54b56bb | 2008-06-13 15:42:55 +0000 | [diff] [blame] | 36 | source parseSiteArg.shsource $stream |
david_williams | 7a915b3 | 2008-06-13 14:04:27 +0000 | [diff] [blame] | 37 | ;; |
| 38 | t) toUpdateSite=${testUpdateSite} |
| 39 | ;; |
| 40 | m) toUpdateSite=${milestoneDirectory} |
| 41 | ;; |
| 42 | r) toUpdateSite=${releaseDir} |
david_williams | 9e307ed | 2008-06-13 14:09:30 +0000 | [diff] [blame] | 43 | ;; |
david_williams | 7a915b3 | 2008-06-13 14:04:27 +0000 | [diff] [blame] | 44 | ?) usage |
| 45 | exit 2 |
| 46 | ;; |
| 47 | esac |
| 48 | done |
| 49 | |
| 50 | shift $(($OPTIND - 1)) |
| 51 | |
| 52 | if [ -z $stream ] |
| 53 | then |
| 54 | echo "" |
| 55 | echo " Need a stream argument" |
| 56 | usage |
| 57 | exit 1 |
| 58 | fi |
| 59 | |
| 60 | if [ -z $toUpdateSite ] |
| 61 | then |
| 62 | echo "" |
| 63 | echo " Need a toUpdateSite argument" |
| 64 | usage |
| 65 | exit 1 |
| 66 | fi |
| 67 | |
david_williams | e412712 | 2008-06-13 15:53:11 +0000 | [diff] [blame] | 68 | if [ verbose ] |
| 69 | then |
| 70 | printf "\n\tstream: " "${stream}" >&2 |
| 71 | printf "\n\tto spdate site: : " "${toUpdateSite}" >&2 |
| 72 | |
| 73 | fi |
| 74 | |
david_williams | 54b56bb | 2008-06-13 15:42:55 +0000 | [diff] [blame] | 75 | export BUILD_INITIALIZED=1 |
david_williams | 7a915b3 | 2008-06-13 14:04:27 +0000 | [diff] [blame] | 76 | |
| 77 | ./ant.sh -f createPack200s.xml -Declipse.home=${eclipseLocation} -Dupdate.site=${toUpdateSite} |
| 78 | |