Add a -l switch that takes an argument of either github or gitorious and will make the cover letter have a fill-in-the-blank of where the changes are on either github or gitorious.
Signed-off-by: Tom Rini <tom_r...@mentor.com> --- scripts/create-pull-request | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 784b48c..2e02d82 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request @@ -18,6 +18,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to -b contrib_branch Branch-name in the $PULL_URL -s subject The subject to be inserted into the summary email -p prefix Use [prefix N/M] instead of [PATCH N/M] as the subject prefix + -l location The location (github or gitorious) where the changes are if not in the default contrib repository Examples: $CMD -b nitin/basic @@ -28,7 +29,7 @@ EOM } # Parse and validate arguments -while getopts "b:hi:m:o:r:s:p:" OPT; do +while getopts "b:hi:i:l:m:o:r:s:p:" OPT; do case $OPT in b) CONTRIB_BRANCH="$OPTARG" @@ -40,6 +41,22 @@ while getopts "b:hi:m:o:r:s:p:" OPT; do i) COMMIT_ID="$OPTARG" ;; + l) + case $OPTARG in + github) + PULL_URL="git://github.com/PROJECT/REPO.git" + WEB_URL_PREFIX="https://github.com/PROJECT/REPO/tree/" + ;; + gitorious) + PULL_URL="git://gitorious.org/PROJECT/REPO.git" + WEB_URL_PREFIX="http://gitorious.org/PROJECTS/REPO/commits/" + ;; + *) + echo "ERROR: Unknown location where the changes are hosted" + exit 1 + ;; + esac + ;; m) BODY="$OPTARG" if [ ! -e "$BODY" ]; then -- 1.7.0.4 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core