summaryrefslogtreecommitdiffstats
path: root/scripts/send-pull-request
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/send-pull-request')
-rwxr-xr-xscripts/send-pull-request15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 5a11d1f1e6..21eb302169 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -41,6 +41,18 @@ harvest_recipients()
41 unset IFS 41 unset IFS
42} 42}
43 43
44check_git_sendemail_config()
45{
46 GIT_SMTP=$(git config sendemail.smtpserver)
47 GIT_FROM=$(git config sendemail.from)
48 if [ -z "$GIT_SMTP" ] || [ -z "$GIT_FROM" ]; then
49 echo "ERROR: git sendemail is not configured."
50 echo "Please read GIT-SEND-EMAIL(1) and configure:"
51 echo " sendemail.smtpserver"
52 echo " sendemail.from"
53 exit 1
54 fi
55}
44 56
45# Parse and verify arguments 57# Parse and verify arguments
46while getopts "achp:t:" OPT; do 58while getopts "achp:t:" OPT; do
@@ -74,6 +86,9 @@ while getopts "achp:t:" OPT; do
74 esac 86 esac
75done 87done
76 88
89# Abort early if git-send-email is not properly configured
90check_git_sendemail_config
91
77if [ -z "$PDIR" ]; then 92if [ -z "$PDIR" ]; then
78 echo "ERROR: you must specify a pull-dir." 93 echo "ERROR: you must specify a pull-dir."
79 usage 94 usage