global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs

Using the method from @cemeyer
(https://github.com/espressif/esp-idf/pull/3166):

find . -name \*.sh -exec sed -i "" -e 's|^#!.*bin/bash|#!/usr/bin/env bash|' {} +

Closes https://github.com/espressif/esp-idf/pull/3166.
This commit is contained in:
Ivan Grokhotkov 2020-04-03 01:10:02 +02:00
parent 8210802703
commit e94288da31
42 changed files with 49 additions and 49 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail

View File

@ -1,4 +1,4 @@
#! /bin/bash #!/usr/bin/env bash
{ coverage debug sys \ { coverage debug sys \
&& coverage erase \ && coverage erase \

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Run the test suite with all configurations enabled # Run the test suite with all configurations enabled
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Check if folders with localized documentation are in sync # Check if folders with localized documentation are in sync
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
rm -rf build && mkdir build && cd build rm -rf build && mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32.cmake -DTARGET=esp32 -GNinja cmake .. -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32.cmake -DTARGET=esp32 -GNinja
cmake --build . cmake --build .

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
rm -rf build && mkdir build && cd build rm -rf build && mkdir build && cd build
cmake .. cmake ..
cmake --build . cmake --build .

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
cd build cd build
python $IDF_PATH/components/esptool_py/esptool/esptool.py -p $1 write_flash @flash_project_args python $IDF_PATH/components/esptool_py/esptool/esptool.py -p $1 write_flash @flash_project_args
python $IDF_PATH/tools/idf_monitor.py -p $1 idf_as_lib.elf python $IDF_PATH/tools/idf_monitor.py -p $1 idf_as_lib.elf

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/usr/bin/env bash
cd build cd build
./idf_as_lib.elf ./idf_as_lib.elf

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Demonstrates command-line interface of Partition Tool, parttool.py # Demonstrates command-line interface of Partition Tool, parttool.py
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Demonstrates command-line interface of OTA Partitions Tool, otatool.py # Demonstrates command-line interface of OTA Partitions Tool, otatool.py
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Build all examples from the examples directory, out of tree to # Build all examples from the examples directory, out of tree to
# ensure they can run when copied to a new directory. # ensure they can run when copied to a new directory.

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Build all examples from the examples directory, in BUILD_PATH to # Build all examples from the examples directory, in BUILD_PATH to
# ensure they can run when copied to a new directory. # ensure they can run when copied to a new directory.

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Build test apps # Build test apps
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# This script finds executable files in the repository, excluding some directories, # This script finds executable files in the repository, excluding some directories,
# then prints the list of all files which are not in executable-list.txt. # then prints the list of all files which are not in executable-list.txt.
# Returns with error if this list is non-empty. # Returns with error if this list is non-empty.

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# While we support GNU Make & CMake together, check the same examples are present for both. But only for ESP32 # While we support GNU Make & CMake together, check the same examples are present for both. But only for ESP32

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Examples shouldn't include rom headers directly # Examples shouldn't include rom headers directly

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -u set -u
set -e set -e

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# While we support GNU Make & CMake together, check that unit tests support both # While we support GNU Make & CMake together, check that unit tests support both
CMAKE_UT_PATHS=$( find ${IDF_PATH}/components/ -type f -name CMakeLists.txt | grep "/test/" | grep -v "mbedtls/programs") CMAKE_UT_PATHS=$( find ${IDF_PATH}/components/ -type f -name CMakeLists.txt | grep "/test/" | grep -v "mbedtls/programs")

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# This script finds and fixes up empty prototypes, to satisfy `-Wstrict-prototypes` and to сomply the C Standard # This script finds and fixes up empty prototypes, to satisfy `-Wstrict-prototypes` and to сomply the C Standard

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Now git submodules are redirected to mirror automatically according to relative URLs in .gitmodules # Now git submodules are redirected to mirror automatically according to relative URLs in .gitmodules

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -o errexit set -o errexit
set -o pipefail set -o pipefail
set -o nounset set -o nounset

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Now git submodules are redirected to mirror automatically according to relative URLs in .gitmodules # Now git submodules are redirected to mirror automatically according to relative URLs in .gitmodules

View File

@ -1,4 +1,4 @@
#! /bin/bash #!/usr/bin/env bash
# #
# Tool for running scripts with several versions of Python by the use of pyenv (versions must be installed before in # Tool for running scripts with several versions of Python by the use of pyenv (versions must be installed before in
# the docker image) # the docker image)

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# gitlab-ci script to push current tested revision (tag or branch) to github # gitlab-ci script to push current tested revision (tag or branch) to github

View File

@ -1,4 +1,4 @@
#! /bin/bash #!/usr/bin/env bash
# Regexp for matching job names which are incompatible with Python 3 # Regexp for matching job names which are incompatible with Python 3
# - assign_test, nvs_compatible_test, IT - auto_test_script causes the incompatibility # - assign_test, nvs_compatible_test, IT - auto_test_script causes the incompatibility

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test the build system for basic consistency # Test the build system for basic consistency
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test the build system for basic consistency (Cmake/idf.py version) # Test the build system for basic consistency (Cmake/idf.py version)
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Short script to verify behaviour of configure_ci_environment.sh # Short script to verify behaviour of configure_ci_environment.sh
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Run cmakelint on all cmake files in IDF_PATH (except third party) # Run cmakelint on all cmake files in IDF_PATH (except third party)
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
set -e set -e
. $IDF_PATH/export.sh . $IDF_PATH/export.sh

View File

@ -1,4 +1,4 @@
#! /bin/bash #!/usr/bin/env bash
{ coverage debug sys \ { coverage debug sys \
&& coverage erase &> output \ && coverage erase &> output \

View File

@ -1,4 +1,4 @@
#! /bin/bash #!/usr/bin/env bash
{ coverage debug sys \ { coverage debug sys \
&& coverage erase &> output \ && coverage erase &> output \

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Runs astyle with parameters which should be checked in a pre-commit hook # Runs astyle with parameters which should be checked in a pre-commit hook
astyle \ astyle \
--style=otbs \ --style=otbs \

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Runs astyle with the full set of formatting options # Runs astyle with the full set of formatting options
astyle \ astyle \
--style=otbs \ --style=otbs \

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Check ncurses compatibility # Check ncurses compatibility
if [ "$OSTYPE" != "msys" ]; then if [ "$OSTYPE" != "msys" ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Explicitly switches the relative submodules locations on GitHub to the original public URLs # Explicitly switches the relative submodules locations on GitHub to the original public URLs
# #

View File

@ -1,4 +1,4 @@
#! /bin/bash #!/usr/bin/env bash
{ coverage debug sys \ { coverage debug sys \
&& coverage erase &> output \ && coverage erase &> output \

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
cd ${IDF_PATH}/tools/unit-test-app cd ${IDF_PATH}/tools/unit-test-app

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
echo "eclipse_make.sh has been replaced with eclipse_make.py. Check the Windows Eclipse docs for the new command." echo "eclipse_make.sh has been replaced with eclipse_make.py. Check the Windows Eclipse docs for the new command."
echo "This shell script will continue to work until the next major release." echo "This shell script will continue to work until the next major release."
python ${IDF_PATH}/tools/windows/eclipse_make.py $@ python ${IDF_PATH}/tools/windows/eclipse_make.py $@

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Script to build the IDF Tools installer for Windows with Inno Setup. # Script to build the IDF Tools installer for Windows with Inno Setup.
# This script should be executed inside wine-innosetup docker image. # This script should be executed inside wine-innosetup docker image.

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Script to sign the IDF Tools installer for Windows, built with build_installer.sh. # Script to sign the IDF Tools installer for Windows, built with build_installer.sh.
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Setup script to configure an MSYS2 environment for ESP-IDF. # Setup script to configure an MSYS2 environment for ESP-IDF.
# #