Skip to content

Commit e94288d

Browse files
committed
global: use '/usr/bin/env bash' instead of '/usr/bin/bash' in shebangs
Using the method from @cemeyer (#3166): find . -name \*.sh -exec sed -i "" -e 's|^#!.*bin/bash|#!/usr/bin/env bash|' {} + Closes #3166.
1 parent 8210802 commit e94288d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+49
-49
lines changed

components/esp_wifi/test_md5/test_md5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -euo pipefail
44

components/espcoredump/test/test_espcoredump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/usr/bin/env bash
22

33
{ coverage debug sys \
44
&& coverage erase \

components/heap/test_multi_heap_host/test_all_configs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Run the test suite with all configurations enabled
44
#

docs/check_lang_folder_sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Check if folders with localized documentation are in sync
44
#
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
rm -rf build && mkdir build && cd build
33
cmake .. -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32.cmake -DTARGET=esp32 -GNinja
4-
cmake --build .
4+
cmake --build .
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
rm -rf build && mkdir build && cd build
33
cmake ..
4-
cmake --build .
4+
cmake --build .
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
cd build
33
python $IDF_PATH/components/esptool_py/esptool/esptool.py -p $1 write_flash @flash_project_args
4-
python $IDF_PATH/tools/idf_monitor.py -p $1 idf_as_lib.elf
4+
python $IDF_PATH/tools/idf_monitor.py -p $1 idf_as_lib.elf
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
cd build
3-
./idf_as_lib.elf
3+
./idf_as_lib.elf

examples/storage/parttool/parttool_example.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Demonstrates command-line interface of Partition Tool, parttool.py
44
#
@@ -70,4 +70,4 @@ assert_file_same read.bin blank.bin "Contents of storage partition not fully era
7070

7171
# Example end and cleanup
7272
printf "\nPartition tool operations performed successfully\n"
73-
rm -rf app.bin read.bin blank.bin write.bin
73+
rm -rf app.bin read.bin blank.bin write.bin

examples/system/ota/otatool/otatool_example.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Demonstrates command-line interface of OTA Partitions Tool, otatool.py
44
#
@@ -92,4 +92,4 @@ assert_running_partition ota_1
9292

9393
# Example end and cleanup
9494
printf "\nPartition tool operations performed successfully\n"
95-
rm -rf app0.bin app1.bin
95+
rm -rf app0.bin app1.bin

tools/ci/build_examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Build all examples from the examples directory, out of tree to
44
# ensure they can run when copied to a new directory.

tools/ci/build_examples_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Build all examples from the examples directory, in BUILD_PATH to
44
# ensure they can run when copied to a new directory.

tools/ci/build_test_apps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Build test apps
44
#

tools/ci/check-executable.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script finds executable files in the repository, excluding some directories,
33
# then prints the list of all files which are not in executable-list.txt.
44
# Returns with error if this list is non-empty.

tools/ci/check_examples_cmake_make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# While we support GNU Make & CMake together, check the same examples are present for both. But only for ESP32
44

tools/ci/check_examples_rom_header.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Examples shouldn't include rom headers directly
44

tools/ci/check_idf_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -u
44
set -e

tools/ci/check_ut_cmake_make.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# While we support GNU Make & CMake together, check that unit tests support both
44
CMAKE_UT_PATHS=$( find ${IDF_PATH}/components/ -type f -name CMakeLists.txt | grep "/test/" | grep -v "mbedtls/programs")
@@ -16,4 +16,4 @@ if [ -n "$MISMATCH" ]; then
1616
fi
1717

1818
echo "Unit tests match"
19-
exit 0
19+
exit 0

tools/ci/fix_empty_prototypes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This script finds and fixes up empty prototypes, to satisfy `-Wstrict-prototypes` and to сomply the C Standard
44

tools/ci/get-full-sources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Now git submodules are redirected to mirror automatically according to relative URLs in .gitmodules
44

tools/ci/get_supported_examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -o errexit
33
set -o pipefail
44
set -o nounset

tools/ci/mirror-submodule-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Now git submodules are redirected to mirror automatically according to relative URLs in .gitmodules
44

tools/ci/multirun_with_pyenv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Tool for running scripts with several versions of Python by the use of pyenv (versions must be installed before in
44
# the docker image)

tools/ci/push_to_github.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# gitlab-ci script to push current tested revision (tag or branch) to github
44

tools/ci/setup_python.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/usr/bin/env bash
22

33
# Regexp for matching job names which are incompatible with Python 3
44
# - assign_test, nvs_compatible_test, IT - auto_test_script causes the incompatibility

tools/ci/test_build_system.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Test the build system for basic consistency
44
#

tools/ci/test_build_system_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Test the build system for basic consistency (Cmake/idf.py version)
44
#

tools/ci/test_configure_ci_environment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Short script to verify behaviour of configure_ci_environment.sh
44
#

tools/cmake/run_cmake_lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Run cmakelint on all cmake files in IDF_PATH (except third party)
44
#

tools/docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33

44
. $IDF_PATH/export.sh

tools/esp_app_trace/test/logtrace/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/usr/bin/env bash
22

33
{ coverage debug sys \
44
&& coverage erase &> output \

tools/esp_app_trace/test/sysview/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/usr/bin/env bash
22

33
{ coverage debug sys \
44
&& coverage erase &> output \

tools/format-minimal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Runs astyle with parameters which should be checked in a pre-commit hook
33
astyle \
44
--style=otbs \

tools/format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Runs astyle with the full set of formatting options
33
astyle \
44
--style=otbs \

tools/kconfig/lxdialog/check-lxdialog.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Check ncurses compatibility
33

44
if [ "$OSTYPE" != "msys" ]; then

tools/set-submodules-to-github.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Explicitly switches the relative submodules locations on GitHub to the original public URLs
44
#

tools/test_idf_size/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/usr/bin/env bash
22

33
{ coverage debug sys \
44
&& coverage erase &> output \

tools/unit-test-app/tools/get_available_configs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
cd ${IDF_PATH}/tools/unit-test-app
44

tools/windows/eclipse_make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
echo "eclipse_make.sh has been replaced with eclipse_make.py. Check the Windows Eclipse docs for the new command."
33
echo "This shell script will continue to work until the next major release."
44
python ${IDF_PATH}/tools/windows/eclipse_make.py $@

tools/windows/tool_setup/build_installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Script to build the IDF Tools installer for Windows with Inno Setup.
44
# This script should be executed inside wine-innosetup docker image.

tools/windows/tool_setup/sign_installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Script to sign the IDF Tools installer for Windows, built with build_installer.sh.
44
#

tools/windows/windows_install_prerequisites.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Setup script to configure an MSYS2 environment for ESP-IDF.
44
#

0 commit comments

Comments
 (0)