]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-pull-request: cleanup bashisms
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 12 Aug 2015 09:33:31 +0000 (12:33 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 16 Aug 2015 08:23:27 +0000 (09:23 +0100)
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>
scripts/create-pull-request

index be493795b56e5f500173305cc3f3b226b70f57d3..19ba58869f9c700a40a50acfa6a9994d9d665033 100755 (executable)
@@ -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"