All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Ricardo Martincoski <ricardo.martincoski@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] utils/docker-run: use portable bash shebang
Date: Mon, 14 Feb 2022 17:36:09 +0100	[thread overview]
Message-ID: <20220214163609.GD38097@scaer> (raw)
In-Reply-To: <20220214162413.17301-1-luca@lucaceresoli.net>

Luca, All,

On 2022-02-14 17:24 +0100, Luca Ceresoli spake thusly:
> /usr/bin/bash does not exist on Ubuntu 2018.04. Use the more portable
> alternative /bin/bash.
> 
> Note that currently "/usr/bin/bash" does not appear anywhere in the
> Buildroot source code, while "/bin/bash" is used by many scripts.

The real portable solution is to use /usr/bin/env, which is mandated by
POSIX:
    #!/usr/bin/env bash

and which we already use quite a bit:
    $ git grep 'env bash' |wc -l 
    34

(No need to respin, it can be fixed when applying, I guess...)

Regards,
Yann E. MORIN.

> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Fixes: 242e9d72e7d2 ("utils/docker-run: new script")
> ---
>  utils/docker-run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/docker-run b/utils/docker-run
> index 0614f1325d78..979aec69b946 100755
> --- a/utils/docker-run
> +++ b/utils/docker-run
> @@ -1,4 +1,4 @@
> -#!/usr/bin/bash
> +#!/bin/bash
>  set -o errexit -o pipefail
>  DIR=$(dirname "${0}")
>  MAIN_DIR=$(readlink -f "${DIR}/..")
> -- 
> 2.35.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-02-14 16:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 16:24 [Buildroot] [PATCH 1/2] utils/docker-run: use portable bash shebang Luca Ceresoli
2022-02-14 16:24 ` [Buildroot] [PATCH 2/2] utils/docker-run: allow interactive use Luca Ceresoli
2022-02-14 16:28   ` Giulio Benetti
2022-02-14 16:36 ` Yann E. MORIN [this message]
2022-02-14 17:04 ` [Buildroot] [PATCH 1/2] utils/docker-run: use portable bash shebang Yann E. MORIN

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=20220214163609.GD38097@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=luca@lucaceresoli.net \
    --cc=ricardo.martincoski@gmail.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.