diff --git a/scripts/create-pull-request b/scripts/create-pull-request new file mode 100755 index 0000000000..5ad7666ab3 --- /dev/null +++ b/scripts/create-pull-request @@ -0,0 +1,129 @@ +#!/bin/bash +ODIR=pull-$$ +RELATIVE_TO="master" +COMMIT_ID="HEAD" +PULL_URL="git://git.pokylinux.org/poky-contrib.git" +PREFIX="PATCH" + +usage() { +CMD=$(basename $0) +cat < /dev/null + + +# Customize the cover letter +CL="$ODIR/0000-cover-letter.patch" +(cat < +--- + +EOM +) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL" + +# If the user specified a message body, insert it into the cover letter and +# remove the BLURB token. +if [ -n "$BODY" ]; then + sed -i "/BLURB HERE/ r $BODY" "$CL" + sed -i "/BLURB HERE/ d" "$CL" +fi + +# If the user specified a subject, replace the SUBJECT token with it. +if [ -n "$SUBJECT" ]; then + sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL" +fi + + +# Generate report for user +cat <