summaryrefslogtreecommitdiffstats
path: root/scripts/create-pull-request
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:23:27 +0100
commitb5c77a94b97b316b7ea075841d18b73e6dccbf2d (patch)
tree27cbedeef3f9e0abb61eddd93e907f9e8f45454b /scripts/create-pull-request
parentaddc26fb193d3fd259f10aaaae3b0de2f21c81f5 (diff)
downloadopenembedded-core-contrib-b5c77a94b97b316b7ea075841d18b73e6dccbf2d.tar.gz
openembedded-core-contrib-b5c77a94b97b316b7ea075841d18b73e6dccbf2d.tar.bz2
openembedded-core-contrib-b5c77a94b97b316b7ea075841d18b73e6dccbf2d.zip
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/create-pull-request')
-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 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright (c) 2010-2013, Intel Corporation.
# All Rights Reserved
@@ -177,14 +177,15 @@ mkdir $ODIR
if [ -n "$RELDIR" ]; then
ODIR=$(realpath $ODIR)
- pushd $RELDIR > /dev/null
+ pdir=$(pwd)
+ cd $RELDIR
extraopts="--relative"
fi
# Generate the patches and cover letter
git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
-[ -n "$RELDIR" ] && popd > /dev/null
+[ -n "$RELDIR" ] && cd $pdir
# Customize the cover letter
CL="$ODIR/0000-cover-letter.patch"