summaryrefslogtreecommitdiffstats
path: root/scripts/send-pull-request
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-05-13 15:42:37 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-19 23:40:39 +0100
commita13fe8e454562a525520dd050d7783898fd29486 (patch)
tree5e864cdd2ae7c566551f53a1a745973010f85faa /scripts/send-pull-request
parent2b56f7b8c60290a09a27cc764bc420efbbe373d3 (diff)
downloadpoky-a13fe8e454562a525520dd050d7783898fd29486.tar.gz
send-pull-request: verify git sendemail config
Perform a quick sanity check to be able to direct users to configure git.sendemail if they haven't yet. (From OE-Core rev: 95185de6f149a495201701d260921339e3dfaebd) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Cc: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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