From 0971c47e8403e1afd08bf4d6018254e95f84ea51 Mon Sep 17 00:00:00 2001 From: Filip Czaplicki Date: Sun, 20 Jul 2025 12:28:07 +0200 Subject: [PATCH] Portable bash shebang Signed-off-by: Filip Czaplicki --- docs/SUBWAY_GENERATION.md | 2 +- pyhelpers/specs/build.sh | 2 +- search/search_quality/download-maps.sh | 2 +- tools/autobuild/detect_cmake.sh | 2 +- tools/unix/benchmarks.sh | 2 +- tools/unix/find_generator_tool.sh | 2 +- tools/unix/generate_drules.sh | 2 +- tools/unix/generate_proto.sh | 2 +- tools/unix/generate_styles.sh | 2 +- tools/unix/generate_vulkan_shaders.sh | 2 +- tools/unix/maps/generate_subways.sh | 2 +- tools/unix/osrm_online_server_generator.sh | 2 +- tools/unix/test_planet.sh | 2 +- tools/unix/update_gplay_relnotes.sh | 2 +- tools/unix/version.sh | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/SUBWAY_GENERATION.md b/docs/SUBWAY_GENERATION.md index 235aed85e..34677d7f4 100644 --- a/docs/SUBWAY_GENERATION.md +++ b/docs/SUBWAY_GENERATION.md @@ -34,7 +34,7 @@ whole planet is also applicable. The last three steps may be expressed as the following shell script: ```bash -#!/bin/bash +#!/usr/bin/env bash set -e REPO="/path/to/cloned/repo" diff --git a/pyhelpers/specs/build.sh b/pyhelpers/specs/build.sh index 238047351..0173c1b7a 100644 --- a/pyhelpers/specs/build.sh +++ b/pyhelpers/specs/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash PROJECT=$1 VERSION=$2 RELEASE=$3 diff --git a/search/search_quality/download-maps.sh b/search/search_quality/download-maps.sh index bff13fff7..285785bae 100755 --- a/search/search_quality/download-maps.sh +++ b/search/search_quality/download-maps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Downloads all maps necessary for learning to rank to the current # directory. diff --git a/tools/autobuild/detect_cmake.sh b/tools/autobuild/detect_cmake.sh index ef186f7fb..abef70dd0 100755 --- a/tools/autobuild/detect_cmake.sh +++ b/tools/autobuild/detect_cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u # If CMAKE variable is set, use it diff --git a/tools/unix/benchmarks.sh b/tools/unix/benchmarks.sh index b92736e58..f561dd2e2 100755 --- a/tools/unix/benchmarks.sh +++ b/tools/unix/benchmarks.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u diff --git a/tools/unix/find_generator_tool.sh b/tools/unix/find_generator_tool.sh index 156ca53f1..54e68570c 100755 --- a/tools/unix/find_generator_tool.sh +++ b/tools/unix/find_generator_tool.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ##################################### # Locates generator_tool executable # ##################################### diff --git a/tools/unix/generate_drules.sh b/tools/unix/generate_drules.sh index 582e330ca..3bbde5d66 100755 --- a/tools/unix/generate_drules.sh +++ b/tools/unix/generate_drules.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u # Prevent python from generating compiled *.pyc files diff --git a/tools/unix/generate_proto.sh b/tools/unix/generate_proto.sh index ec711aa09..8cfcbc070 100755 --- a/tools/unix/generate_proto.sh +++ b/tools/unix/generate_proto.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u -x OMIM_PATH="${OMIM_PATH:-$(dirname "$0")/../..}" diff --git a/tools/unix/generate_styles.sh b/tools/unix/generate_styles.sh index 1228ab1c3..f3ad24bbc 100755 --- a/tools/unix/generate_styles.sh +++ b/tools/unix/generate_styles.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u SCRIPTS_PATH="$(dirname "$0")" "$SCRIPTS_PATH/generate_symbols.sh" diff --git a/tools/unix/generate_vulkan_shaders.sh b/tools/unix/generate_vulkan_shaders.sh index 1db579579..159af305b 100755 --- a/tools/unix/generate_vulkan_shaders.sh +++ b/tools/unix/generate_vulkan_shaders.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u # Prevent python from generating compiled *.pyc files diff --git a/tools/unix/maps/generate_subways.sh b/tools/unix/maps/generate_subways.sh index 5f9333999..867210368 100755 --- a/tools/unix/maps/generate_subways.sh +++ b/tools/unix/maps/generate_subways.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -u -o pipefail # Generate subways.transit.json file consumed by the maps generator. diff --git a/tools/unix/osrm_online_server_generator.sh b/tools/unix/osrm_online_server_generator.sh index a419d1188..a38e81518 100755 --- a/tools/unix/osrm_online_server_generator.sh +++ b/tools/unix/osrm_online_server_generator.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -u -x -e diff --git a/tools/unix/test_planet.sh b/tools/unix/test_planet.sh index b9db599aa..a9129d81a 100755 --- a/tools/unix/test_planet.sh +++ b/tools/unix/test_planet.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ##################################################### # Tests a planet build made with generate_planet.sh # ##################################################### diff --git a/tools/unix/update_gplay_relnotes.sh b/tools/unix/update_gplay_relnotes.sh index 944452c6b..6431250dc 100755 --- a/tools/unix/update_gplay_relnotes.sh +++ b/tools/unix/update_gplay_relnotes.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Concatenates Android release notes in all languages into a single output format # suitable to upload to Google Play to update existing notes. diff --git a/tools/unix/version.sh b/tools/unix/version.sh index 550840651..0de8f7c7e 100755 --- a/tools/unix/version.sh +++ b/tools/unix/version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Should be used everywhere to generate a consistent version number based # on the date of the last commit and a number of commits on that day. set -euo pipefail