diff options
| -rwxr-xr-x | scripts/send-pull-request | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/scripts/send-pull-request b/scripts/send-pull-request index 7f51a1b259..3af2a9fa7e 100755 --- a/scripts/send-pull-request +++ b/scripts/send-pull-request | |||
| @@ -109,15 +109,17 @@ if [ $AUTO -eq 1 ]; then | |||
| 109 | harvest_recipients CC "^.*-[Bb][Yy]: *" | 109 | harvest_recipients CC "^.*-[Bb][Yy]: *" |
| 110 | fi | 110 | fi |
| 111 | 111 | ||
| 112 | if [ -z "$TO" ] && [ -z "$CC" ]; then | ||
| 113 | echo "ERROR: you have not specified any recipients." | ||
| 114 | usage | ||
| 115 | exit 1 | ||
| 116 | fi | ||
| 117 | |||
| 118 | case "$PULL_MTA" in | 112 | case "$PULL_MTA" in |
| 119 | git) | 113 | git) |
| 120 | FROM="$(git config sendemail.from)" | 114 | FROM="$(git config sendemail.from)" |
| 115 | AUTO_TO="$(git config sendemail.to)" | ||
| 116 | if [ -n "$AUTO_TO" ]; then | ||
| 117 | if [ -n "$TO" ]; then | ||
| 118 | TO="$TO,$AUTO_TO" | ||
| 119 | else | ||
| 120 | TO="$AUTO_TO" | ||
| 121 | fi | ||
| 122 | fi | ||
| 121 | ;; | 123 | ;; |
| 122 | sendmail) | 124 | sendmail) |
| 123 | if [ -z "$FROM" ]; then | 125 | if [ -z "$FROM" ]; then |
| @@ -131,6 +133,13 @@ case "$PULL_MTA" in | |||
| 131 | ;; | 133 | ;; |
| 132 | esac | 134 | esac |
| 133 | 135 | ||
| 136 | if [ -z "$TO" ] && [ -z "$CC" ]; then | ||
| 137 | echo "ERROR: you have not specified any recipients." | ||
| 138 | usage | ||
| 139 | exit 1 | ||
| 140 | fi | ||
| 141 | |||
| 142 | |||
| 134 | # Generate report for the user and require confirmation before sending | 143 | # Generate report for the user and require confirmation before sending |
| 135 | cat <<EOM | 144 | cat <<EOM |
| 136 | The following patches: | 145 | The following patches: |
