Re: [PATCH 1/3] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 03, 2019 at 07:46:03AM +0100, Michael Olbrich wrote:
> On Thu, Nov 28, 2019 at 12:19:44AM +0100, Florian Klink wrote:
> > Some distributions might not have bash in /bin, but in $PATH.
> > 
> > Using #!/usr/bin/env bash solves this, and is consistent with how the
> > perl and python shebangs look like in the tree.
> > ---
> >  scripts/canon-a1100-image        | 2 +-
> >  scripts/check_size               | 2 +-
> >  scripts/dfuboot.sh               | 2 +-
> >  scripts/extract_symbol_offset    | 2 +-
> >  scripts/gen-dtb-s                | 2 +-
> >  scripts/genenv                   | 2 +-
> >  scripts/socfpga_get_sequencer    | 2 +-
> >  scripts/socfpga_import_preloader | 2 +-
> >  scripts/socfpga_xml_to_config.sh | 2 +-
> >  9 files changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/scripts/canon-a1100-image b/scripts/canon-a1100-image
> > index 6c08d7493..237ce26d8 100755
> > --- a/scripts/canon-a1100-image
> > +++ b/scripts/canon-a1100-image
> > @@ -1,4 +1,4 @@
> > -#!/bin/bash -e
> > +#!/usr/bin/env bash -e
> 
> This does not work:
> 
> /usr/bin/env: ‘bash -e’: No such file or directory
> /usr/bin/env: use -[v]S to pass options in shebang lines
> 
> Using '/usr/bin/env -S bash -e' works, but I'm not sure how portable that
> is.

Why not:

#!/usr/bin/env bash

set -e

?

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux