[OE-core] [PATCH v4] create-pull-request: cleanup bashisms

Khem Raj raj.khem at gmail.com
Wed Aug 12 09:35:18 UTC 2015


On Wed, Aug 12, 2015 at 2:33 AM, Ed Bartosh <ed.bartosh at linux.intel.com> wrote:
> 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.

thanks for doing this.

>
> Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
> ---
>  scripts/create-pull-request | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/create-pull-request b/scripts/create-pull-request
> index be49379..19ba588 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"
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list