All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Krzysztof Kanas <kkanas@fastmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] package/environment-setup/environment-setup: add zsh
Date: Sat, 11 Sep 2021 16:53:11 +0200	[thread overview]
Message-ID: <abdf55d4-63da-1791-b47b-39197c4ce0f3@mind.be> (raw)
In-Reply-To: <20210902112848.41512-1-kkanas@fastmail.com>



On 02/09/2021 13:28, Krzysztof Kanas wrote:
> environment-setup used BASH_SOURCE which is bash specific and empty
> variable for zsh (and other shell's).
> Zsh Uses $0. Unfortunately POSIX is not specifying how exactly $0
> should behave when in sourced (or using special dot utility). So other
> shell support have to be implemented in different manner.
> 
> Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
> 
> ---
> Changes in v2:
> 	- fix shell detection logic
> 	- change commit comment
> ---
>  package/environment-setup/environment-setup | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/package/environment-setup/environment-setup b/package/environment-setup/environment-setup
> index e9bc36fdd093..6716c19a577a 100644
> --- a/package/environment-setup/environment-setup
> +++ b/package/environment-setup/environment-setup
> @@ -16,4 +16,10 @@ Some tips:
>  * To build CMake-based projects, use the "cmake" alias
>  
>  EOF
> -SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}"))
> +if [ x"$BASH_VERSION" != x"" ] ; then
> +	SDK_PATH=$(dirname $(realpath "${BASH_SOURCE[0]}"))
> +elif [ x"$ZSH_VERSION" != x"" ] ; then
> +	SDK_PATH=$(dirname $(realpath $0))
> +else
> +	echo unsuported shell

 I fixed the spelling mistake, added quotes around it, and applied to master,
thanks.

 Regards,
 Arnout

> +fi
> 
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2021-09-11 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 20:13 [Buildroot] [PATCH 1/1] package/environment-setup/environment-setup: add zsh Krzysztof Kanas
2021-09-01 13:26 ` Arnout Vandecappelle
2021-09-01 14:48   ` Krzysztof Kanas
2021-09-01 14:59     ` Arnout Vandecappelle
2021-09-01 16:04       ` Krzysztof Kanas
     [not found]         ` <20210902112848.41512-1-kkanas@fastmail.com>
2021-09-11 14:53           ` Arnout Vandecappelle [this message]
2021-09-13 13:38           ` [Buildroot] [PATCH v2 " Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abdf55d4-63da-1791-b47b-39197c4ce0f3@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=kkanas@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.