summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-08-12 12:33:31 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-16 09:24:56 +0100
commit4c35cd94e30705756370efd88f990f3127fb8fc1 (patch)
treeea10da87999799a5934594e563771b6d6c1d4785
parentf535efb8653953fdbb4cb508e14cb4c267053590 (diff)
downloadpoky-4c35cd94e30705756370efd88f990f3127fb8fc1.tar.gz
create-pull-request: cleanup bashisms
Made create-pull-request POSIX compatible: - Replaced /bin/bash -> /bin/sh in shebang. - Replaced usage of pushd/popd with generic shell commands. - Tested on zsh and dash. (From OE-Core rev: b5c77a94b97b316b7ea075841d18b73e6dccbf2d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/create-pull-request7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index be493795b5..19ba58869f 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2# 2#
3# Copyright (c) 2010-2013, Intel Corporation. 3# Copyright (c) 2010-2013, Intel Corporation.
4# All Rights Reserved 4# All Rights Reserved
@@ -177,14 +177,15 @@ mkdir $ODIR
177 177
178if [ -n "$RELDIR" ]; then 178if [ -n "$RELDIR" ]; then
179 ODIR=$(realpath $ODIR) 179 ODIR=$(realpath $ODIR)
180 pushd $RELDIR > /dev/null 180 pdir=$(pwd)
181 cd $RELDIR
181 extraopts="--relative" 182 extraopts="--relative"
182fi 183fi
183 184
184# Generate the patches and cover letter 185# Generate the patches and cover letter
185git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null 186git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
186 187
187[ -n "$RELDIR" ] && popd > /dev/null 188[ -n "$RELDIR" ] && cd $pdir
188 189
189# Customize the cover letter 190# Customize the cover letter
190CL="$ODIR/0000-cover-letter.patch" 191CL="$ODIR/0000-cover-letter.patch"