mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Florian Klink <flokli@flokli.de>
To: barebox@lists.infradead.org
Cc: Florian Klink <flokli@flokli.de>
Subject: [PATCH v2 1/4] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash
Date: Thu,  5 Dec 2019 22:45:47 +0100	[thread overview]
Message-ID: <20191205214550.21212-1-flokli@flokli.de> (raw)
In-Reply-To: <20191203091202.cuamocvdyxtr5b6u@pengutronix.de>

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        | 4 +++-
 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, 11 insertions(+), 9 deletions(-)

diff --git a/scripts/canon-a1100-image b/scripts/canon-a1100-image
index 6c08d7493..17fd47373 100755
--- a/scripts/canon-a1100-image
+++ b/scripts/canon-a1100-image
@@ -1,4 +1,6 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
+
+set -e
 
 IFILE=$1
 OFILE=$2
diff --git a/scripts/check_size b/scripts/check_size
index 8530435d3..76608eccc 100755
--- a/scripts/check_size
+++ b/scripts/check_size
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 symbol="$1"
 file="$2"
diff --git a/scripts/dfuboot.sh b/scripts/dfuboot.sh
index 524113b61..9847579ce 100755
--- a/scripts/dfuboot.sh
+++ b/scripts/dfuboot.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 DEVICETREE=
 KERNEL=
diff --git a/scripts/extract_symbol_offset b/scripts/extract_symbol_offset
index 78b866830..d0ea22434 100755
--- a/scripts/extract_symbol_offset
+++ b/scripts/extract_symbol_offset
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 symbol="$1"
 file="$2"
diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
index b2dd253c2..0649247f9 100755
--- a/scripts/gen-dtb-s
+++ b/scripts/gen-dtb-s
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 name=$1
 dtb=$2
diff --git a/scripts/genenv b/scripts/genenv
index 5ebe69963..454f2327b 100755
--- a/scripts/genenv
+++ b/scripts/genenv
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Generate the default environment file from a list of directories
 # usage: genenv <basedir> <objdir> <target> <dir>...
diff --git a/scripts/socfpga_get_sequencer b/scripts/socfpga_get_sequencer
index 36f67498b..5405bfa6b 100755
--- a/scripts/socfpga_get_sequencer
+++ b/scripts/socfpga_get_sequencer
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 if [ "$#" -lt "2" ]
 then
diff --git a/scripts/socfpga_import_preloader b/scripts/socfpga_import_preloader
index 6c748fadb..23e3c380d 100755
--- a/scripts/socfpga_import_preloader
+++ b/scripts/socfpga_import_preloader
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 if [ "$#" -lt "2" ]
 then
diff --git a/scripts/socfpga_xml_to_config.sh b/scripts/socfpga_xml_to_config.sh
index 7e22ebb9e..3bb0dd283 100755
--- a/scripts/socfpga_xml_to_config.sh
+++ b/scripts/socfpga_xml_to_config.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 ## TODO:
 ## - read in mpuclk and nocclk, must be calculated by hand at the moment
-- 
2.24.0


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

  reply	other threads:[~2019-12-05 21:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 23:19 use /usr/bin/env bash shebang instead of /bin/bash Florian Klink
2019-11-27 23:19 ` [PATCH 1/3] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash Florian Klink
2019-12-03  6:46   ` Michael Olbrich
2019-12-03  8:45     ` Sascha Hauer
2019-12-03  9:12       ` Michael Olbrich
2019-12-05 21:45         ` Florian Klink [this message]
2019-12-05 21:45           ` [PATCH v2 2/4] dts/scripts: " Florian Klink
2019-12-05 21:45           ` [PATCH v2 3/4] docs: " Florian Klink
2019-12-05 21:45           ` [PATCH v2 4/4] docs: use #!/usr/bin/env python shebang instead of #!/usr/bin/python Florian Klink
2019-12-06 11:31           ` [PATCH v2 1/4] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash Roland Hieber
2019-12-06 12:32             ` use #!/usr/bin/env binary instead of #!/usr/bin/binary Florian Klink
2019-12-06 12:32               ` [PATCH v3 1/4] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash Florian Klink
2019-12-06 12:32               ` [PATCH v3 2/4] dts/scripts: " Florian Klink
2019-12-06 12:32               ` [PATCH v3 3/4] docs: " Florian Klink
2019-12-06 12:32               ` [PATCH v3 4/4] docs: use #!/usr/bin/env python shebang instead of #!/usr/bin/python Florian Klink
2019-12-06 14:25               ` use #!/usr/bin/env binary instead of #!/usr/bin/binary Sascha Hauer
2019-12-03 12:50     ` [PATCH 1/3] scripts: use #!/usr/bin/env bash shebang instead of #!/bin/bash Roland Hieber
2019-11-27 23:19 ` [PATCH 2/3] dts/scripts: " Florian Klink
2019-11-27 23:19 ` [PATCH 3/3] docs: " Florian Klink
2019-12-02  8:57 ` use /usr/bin/env bash shebang instead of /bin/bash Sascha Hauer
2019-12-02 14:29   ` Florian Klink

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=20191205214550.21212-1-flokli@flokli.de \
    --to=flokli@flokli.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox