]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/send-pull-request: allow sending of patches without a cover letter
authorOtavio Salvador <otavio@ossystems.com.br>
Wed, 7 Dec 2011 21:19:52 +0000 (21:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 9 Dec 2011 17:46:25 +0000 (17:46 +0000)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
scripts/send-pull-request

index be130096c119d7548333b8a7102bb0cde08c27ed..8d51ce2ec1f4d7abb0fa776311de2d7fdb6e267c 100755 (executable)
@@ -108,15 +108,18 @@ fi
 
 
 # Verify the cover letter is complete and free of tokens
-CL="$PDIR/0000-cover-letter.patch"
-for TOKEN in SUBJECT BLURB; do
-       grep -q "*** $TOKEN HERE ***" "$CL"
-       if [ $? -eq 0 ]; then
-               echo "ERROR: Please edit $CL and try again (Look for '*** $TOKEN HERE ***')."
-               exit 1
-       fi
-done
-
+if [ -e $PDIR/0000-cover-letter.patch ]; then
+       CL="$PDIR/0000-cover-letter.patch"
+       for TOKEN in SUBJECT BLURB; do
+               grep -q "*** $TOKEN HERE ***" "$CL"
+               if [ $? -eq 0 ]; then
+                       echo "ERROR: Please edit $CL and try again (Look for '*** $TOKEN HERE ***')."
+                       exit 1
+               fi
+       done
+else
+       echo "WARNING: No cover letter will be send."
+fi
 
 # Harvest emails from the generated patches and populate AUTO_CC.
 if [ $AUTO_CL -eq 1 ]; then