david_williams | 4e4949d | 2008-12-13 18:17:17 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | PROJECT=$1 |
| 4 | if [ -z $PROJECT ] |
| 5 | then |
| 6 | echo "must provide project name as first argumnet" |
| 7 | exit 9; |
| 8 | fi |
| 9 | TODIR=$2 |
| 10 | if [ -z $TODIR ] |
| 11 | then |
| 12 | echo "must provide TODIR name as first argumnet" |
| 13 | exit 8; |
| 14 | fi |
| 15 | DROPDIR=$3 |
| 16 | if [ -z $DROPDIR ] |
| 17 | then |
| 18 | echo "must provide DROPDIR name as first argumnet" |
| 19 | exit 7; |
| 20 | fi |
| 21 | |
| 22 | # ideally, the user executing this mail will have this special file in their home direcotry, |
| 23 | # that can specify a custom 'from' variable, but still use your "real" ID that is subscribed |
| 24 | # to the mailing lists |
| 25 | # set from="\"Your Friendly WTP Builder\" <david_williams@us.ibm.com>" |
david_williams | acb6556 | 2008-12-13 20:02:58 +0000 | [diff] [blame] | 26 | # correction ... doesn't work. Seems the subscription system set's the "from" name, so doesn't work when |
david_williams | 4e4949d | 2008-12-13 18:17:17 +0000 | [diff] [blame] | 27 | # sent to mail list (just other email addresses) |
| 28 | export MAILRC=~/.buildermailrc |
| 29 | |
| 30 | SUBJECT="Declaring Build for $PROJECT: $DROPDIR" |
| 31 | |
| 32 | # wtp-dev for promotes, wtp-releng for smoketest requests |
| 33 | TO="wtp-dev@eclipse.org" |
| 34 | |
| 35 | #make sure reply to goes back to the list |
| 36 | REPLYTO="wtp-dev@eclipse.org" |
| 37 | #we need to "fix up" TODIR since it's in file form, not URL |
| 38 | URLTODIR=${TODIR##*${DOWNLOAD_ROOT}} |
| 39 | mail -s "$SUBJECT" -R "$REPLYTO" "$TO" <<EOF |
| 40 | |
| 41 | |
| 42 | Download Page: |
| 43 | http://download.eclipse.org$URLTODIR$DROPDIR |
| 44 | |
| 45 | General Smoketest results page: |
| 46 | http://wiki.eclipse.org/WTP_Smoke_Test_Results |
| 47 | |
| 48 | EOF |
| 49 | |