summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/ci/flags/gcc10.sh2
-rwxr-xr-xtools/ci/flags/gcc6.sh2
-rwxr-xr-xtools/ci/flags/gcc7.sh2
-rwxr-xr-xtools/ci/flags/gcc8.sh2
-rwxr-xr-xtools/ci/flags/gcc9.sh2
-rwxr-xr-xtools/ci/flags/gccfedora.sh2
-rwxr-xr-xtools/ci/flags/gccsnapshot.sh2
-rwxr-xr-xtools/ci/flags/mingw5.sh2
-rwxr-xr-xtools/ci/flags/mingw6.sh2
-rwxr-xr-xtools/ci/jobs/any_compiler.sh2
-rwxr-xr-xtools/ci/jobs/any_compiler_tests.sh2
-rwxr-xr-xtools/ci/jobs/clang.sh2
-rwxr-xr-xtools/ci/jobs/clang3.sh2
-rwxr-xr-xtools/ci/jobs/clang33.sh2
-rwxr-xr-xtools/ci/jobs/clang34.sh2
-rwxr-xr-xtools/ci/jobs/clang35.sh2
-rwxr-xr-xtools/ci/jobs/clang36.sh2
-rwxr-xr-xtools/ci/jobs/clang37.sh2
-rwxr-xr-xtools/ci/jobs/clang38.sh2
-rwxr-xr-xtools/ci/jobs/clang39.sh2
-rwxr-xr-xtools/ci/jobs/clang39.sh_c++11.sh2
-rwxr-xr-xtools/ci/jobs/clang39_sdl2.sh2
-rwxr-xr-xtools/ci/jobs/clang40.sh2
-rwxr-xr-xtools/ci/jobs/clang50.sh2
-rwxr-xr-xtools/ci/jobs/clang50_tests.sh2
-rwxr-xr-xtools/ci/jobs/clang60.sh2
-rwxr-xr-xtools/ci/jobs/clang60_tests.sh2
-rwxr-xr-xtools/ci/jobs/clang70.sh2
-rwxr-xr-xtools/ci/jobs/clang70_tests.sh2
-rwxr-xr-xtools/ci/jobs/clang_tidy.sh2
-rwxr-xr-xtools/ci/jobs/cmake_gcc49.sh2
-rwxr-xr-xtools/ci/jobs/cpplint.sh2
-rwxr-xr-xtools/ci/jobs/deheader.sh2
-rwxr-xr-xtools/ci/jobs/deheader2.sh2
-rwxr-xr-xtools/ci/jobs/doxygen.sh2
-rwxr-xr-xtools/ci/jobs/gcc10.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_lto.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_sdl2_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_silent.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc10_tests_simd.sh2
-rwxr-xr-xtools/ci/jobs/gcc3.sh2
-rwxr-xr-xtools/ci/jobs/gcc41.sh2
-rwxr-xr-xtools/ci/jobs/gcc43.sh2
-rwxr-xr-xtools/ci/jobs/gcc44.sh2
-rwxr-xr-xtools/ci/jobs/gcc45.sh2
-rwxr-xr-xtools/ci/jobs/gcc46.sh2
-rwxr-xr-xtools/ci/jobs/gcc47.sh2
-rwxr-xr-xtools/ci/jobs/gcc47_c++11.sh2
-rwxr-xr-xtools/ci/jobs/gcc48.sh2
-rwxr-xr-xtools/ci/jobs/gcc48_c++11.sh2
-rwxr-xr-xtools/ci/jobs/gcc49.sh2
-rwxr-xr-xtools/ci/jobs/gcc49_c++11.sh2
-rwxr-xr-xtools/ci/jobs/gcc49_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc49_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc49_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc5.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_c++11.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_h.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_sdl2.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_sdl2_c++11.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_sdl2_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_tarball.sh2
-rwxr-xr-xtools/ci/jobs/gcc5_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc6.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_lto.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_sdl2_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_sdl2_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_silent.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_tarball_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc6_tests_simd.sh2
-rwxr-xr-xtools/ci/jobs/gcc7.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_lto.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_sdl2_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_silent.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc7_tests_simd.sh2
-rwxr-xr-xtools/ci/jobs/gcc8.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_lto.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_sdl2_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_silent.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc8_tests_simd.sh2
-rwxr-xr-xtools/ci/jobs/gcc9.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_lto.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_sanitize.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_sdl2_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_silent.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_tests.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_tests_gcov.sh2
-rwxr-xr-xtools/ci/jobs/gcc9_tests_simd.sh2
-rwxr-xr-xtools/ci/jobs/gccsnapshot.sh2
-rwxr-xr-xtools/ci/jobs/gccsnapshot_sanitize_tests.sh2
-rwxr-xr-xtools/ci/jobs/gccsnapshot_sdl2.sh2
-rwxr-xr-xtools/ci/jobs/gccsnapshot_tests.sh2
-rwxr-xr-xtools/ci/jobs/gitstats.sh2
-rwxr-xr-xtools/ci/jobs/gitstatsh.sh2
-rwxr-xr-xtools/ci/jobs/imagemagiccheck.sh2
-rwxr-xr-xtools/ci/jobs/mplint.sh2
-rwxr-xr-xtools/ci/jobs/mxe_gcc5.sh2
-rwxr-xr-xtools/ci/jobs/mxe_gcc5_tests.sh2
-rwxr-xr-xtools/ci/jobs/mxe_gcc6.sh2
-rwxr-xr-xtools/ci/jobs/mxe_gcc6_tests.sh2
-rwxr-xr-xtools/ci/jobs/nsiqcppstyle.sh2
-rwxr-xr-xtools/ci/jobs/pages.sh2
-rwxr-xr-xtools/ci/jobs/pngcheck.sh2
-rwxr-xr-xtools/ci/jobs/xcode.sh2
-rwxr-xr-xtools/ci/scripts/azure/mxeremovefiles.sh2
-rwxr-xr-xtools/ci/scripts/azure/mxetest.sh2
-rwxr-xr-xtools/ci/scripts/checkldd.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc5.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc6.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc6_sanitize_tests.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc6_tests.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc7.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc7_sanitize_tests.sh2
-rwxr-xr-xtools/ci/scripts/circleci/gcc7_tests.sh2
-rwxr-xr-xtools/ci/scripts/clang_tidy.sh2
-rwxr-xr-xtools/ci/scripts/clonesrc.sh2
-rwxr-xr-xtools/ci/scripts/copylib.sh2
-rwxr-xr-xtools/ci/scripts/copymxedlls.sh2
-rwxr-xr-xtools/ci/scripts/deheader.sh2
-rwxr-xr-xtools/ci/scripts/deheaderS.sh2
-rwxr-xr-xtools/ci/scripts/dockerretry.sh2
-rwxr-xr-xtools/ci/scripts/downloadlib.sh2
-rwxr-xr-xtools/ci/scripts/exit.sh2
-rwxr-xr-xtools/ci/scripts/icccheckfile.sh2
-rwxr-xr-xtools/ci/scripts/init.sh2
-rwxr-xr-xtools/ci/scripts/patchsdl1.sh2
-rwxr-xr-xtools/ci/scripts/retry.sh2
-rwxr-xr-xtools/ci/scripts/rundyecmd.sh2
-rwxr-xr-xtools/ci/scripts/runtest.sh2
-rwxr-xr-xtools/ci/scripts/runtests.sh2
-rwxr-xr-xtools/ci/scripts/separateunittests.sh2
-rwxr-xr-xtools/ci/scripts/test.sh2
-rwxr-xr-xtools/ci/scripts/triggers.sh2
-rwxr-xr-xtools/ci/scripts/updaterepos.sh2
-rwxr-xr-xtools/ci/scripts/winvars.sh2
-rwxr-xr-xtools/update-copyright.sh2
155 files changed, 155 insertions, 155 deletions
diff --git a/tools/ci/flags/gcc10.sh b/tools/ci/flags/gcc10.sh
index d83ecd4ec..6882eb9f1 100755
--- a/tools/ci/flags/gcc10.sh
+++ b/tools/ci/flags/gcc10.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/gcc6.sh b/tools/ci/flags/gcc6.sh
index 97b05f9ab..d1f567f88 100755
--- a/tools/ci/flags/gcc6.sh
+++ b/tools/ci/flags/gcc6.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/gcc7.sh b/tools/ci/flags/gcc7.sh
index 65b3fe02c..d4fc92b9f 100755
--- a/tools/ci/flags/gcc7.sh
+++ b/tools/ci/flags/gcc7.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/gcc8.sh b/tools/ci/flags/gcc8.sh
index 07fcdb571..ffa7274ee 100755
--- a/tools/ci/flags/gcc8.sh
+++ b/tools/ci/flags/gcc8.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/gcc9.sh b/tools/ci/flags/gcc9.sh
index 3ee231b2e..ee3a8cc52 100755
--- a/tools/ci/flags/gcc9.sh
+++ b/tools/ci/flags/gcc9.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/gccfedora.sh b/tools/ci/flags/gccfedora.sh
index 056e18c04..8a629c033 100755
--- a/tools/ci/flags/gccfedora.sh
+++ b/tools/ci/flags/gccfedora.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/gccsnapshot.sh b/tools/ci/flags/gccsnapshot.sh
index 056e18c04..8a629c033 100755
--- a/tools/ci/flags/gccsnapshot.sh
+++ b/tools/ci/flags/gccsnapshot.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/mingw5.sh b/tools/ci/flags/mingw5.sh
index a8da966b8..a8eadc96a 100755
--- a/tools/ci/flags/mingw5.sh
+++ b/tools/ci/flags/mingw5.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/flags/mingw6.sh b/tools/ci/flags/mingw6.sh
index 97b05f9ab..d1f567f88 100755
--- a/tools/ci/flags/mingw6.sh
+++ b/tools/ci/flags/mingw6.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#export CXXFLAGS="${CXXFLAGS} --all-warnings"
#export CXXFLAGS="${CXXFLAGS} --extra-warnings"
diff --git a/tools/ci/jobs/any_compiler.sh b/tools/ci/jobs/any_compiler.sh
index d3e9c5082..62a49f2a3 100755
--- a/tools/ci/jobs/any_compiler.sh
+++ b/tools/ci/jobs/any_compiler.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [ "$NEWCC" != "" ]; then
export CC="$NEWCC"
diff --git a/tools/ci/jobs/any_compiler_tests.sh b/tools/ci/jobs/any_compiler_tests.sh
index fb5feac48..948145192 100755
--- a/tools/ci/jobs/any_compiler_tests.sh
+++ b/tools/ci/jobs/any_compiler_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=tests.log
diff --git a/tools/ci/jobs/clang.sh b/tools/ci/jobs/clang.sh
index c72d9c94c..c1af03eb5 100755
--- a/tools/ci/jobs/clang.sh
+++ b/tools/ci/jobs/clang.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang
export CXX=clang++
diff --git a/tools/ci/jobs/clang3.sh b/tools/ci/jobs/clang3.sh
index 636e8517e..8a8d07902 100755
--- a/tools/ci/jobs/clang3.sh
+++ b/tools/ci/jobs/clang3.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang
export CXX=clang++
diff --git a/tools/ci/jobs/clang33.sh b/tools/ci/jobs/clang33.sh
index 3e788a934..a253d2b5a 100755
--- a/tools/ci/jobs/clang33.sh
+++ b/tools/ci/jobs/clang33.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.3
export CXX=clang++-3.3
diff --git a/tools/ci/jobs/clang34.sh b/tools/ci/jobs/clang34.sh
index 47309f8f1..1dbb0ca81 100755
--- a/tools/ci/jobs/clang34.sh
+++ b/tools/ci/jobs/clang34.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.4
export CXX=clang++-3.4
diff --git a/tools/ci/jobs/clang35.sh b/tools/ci/jobs/clang35.sh
index 29e49e253..2d44a2378 100755
--- a/tools/ci/jobs/clang35.sh
+++ b/tools/ci/jobs/clang35.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.5
export CXX=clang++-3.5
diff --git a/tools/ci/jobs/clang36.sh b/tools/ci/jobs/clang36.sh
index 176cf9c9b..ff2dcc9a7 100755
--- a/tools/ci/jobs/clang36.sh
+++ b/tools/ci/jobs/clang36.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.6
export CXX=clang++-3.6
diff --git a/tools/ci/jobs/clang37.sh b/tools/ci/jobs/clang37.sh
index b60e50949..cfc2dce82 100755
--- a/tools/ci/jobs/clang37.sh
+++ b/tools/ci/jobs/clang37.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.7
export CXX=clang++-3.7
diff --git a/tools/ci/jobs/clang38.sh b/tools/ci/jobs/clang38.sh
index 053ead9ec..f4841174f 100755
--- a/tools/ci/jobs/clang38.sh
+++ b/tools/ci/jobs/clang38.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.8
export CXX=clang++-3.8
diff --git a/tools/ci/jobs/clang39.sh b/tools/ci/jobs/clang39.sh
index 8345437ae..03c42ed0f 100755
--- a/tools/ci/jobs/clang39.sh
+++ b/tools/ci/jobs/clang39.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.9
export CXX=clang++-3.9
diff --git a/tools/ci/jobs/clang39.sh_c++11.sh b/tools/ci/jobs/clang39.sh_c++11.sh
index 95343ccd9..a82900c36 100755
--- a/tools/ci/jobs/clang39.sh_c++11.sh
+++ b/tools/ci/jobs/clang39.sh_c++11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.9
export CXX=clang++-3.9
diff --git a/tools/ci/jobs/clang39_sdl2.sh b/tools/ci/jobs/clang39_sdl2.sh
index c7a05170b..537cf00a5 100755
--- a/tools/ci/jobs/clang39_sdl2.sh
+++ b/tools/ci/jobs/clang39_sdl2.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-3.9
export CXX=clang++-3.9
diff --git a/tools/ci/jobs/clang40.sh b/tools/ci/jobs/clang40.sh
index 907925361..d65b975f6 100755
--- a/tools/ci/jobs/clang40.sh
+++ b/tools/ci/jobs/clang40.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-4.0
export CXX=clang++-4.0
diff --git a/tools/ci/jobs/clang50.sh b/tools/ci/jobs/clang50.sh
index 4ee67d9c0..e535a99fa 100755
--- a/tools/ci/jobs/clang50.sh
+++ b/tools/ci/jobs/clang50.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-5.0
export CXX=clang++-5.0
diff --git a/tools/ci/jobs/clang50_tests.sh b/tools/ci/jobs/clang50_tests.sh
index 7b333d123..cb4ad4b4b 100755
--- a/tools/ci/jobs/clang50_tests.sh
+++ b/tools/ci/jobs/clang50_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-5.0
export CXX=clang++-5.0
diff --git a/tools/ci/jobs/clang60.sh b/tools/ci/jobs/clang60.sh
index 486fb05b7..9d983834b 100755
--- a/tools/ci/jobs/clang60.sh
+++ b/tools/ci/jobs/clang60.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-6.0
export CXX=clang++-6.0
diff --git a/tools/ci/jobs/clang60_tests.sh b/tools/ci/jobs/clang60_tests.sh
index 59aebe4ae..6971d8111 100755
--- a/tools/ci/jobs/clang60_tests.sh
+++ b/tools/ci/jobs/clang60_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-6.0
export CXX=clang++-6.0
diff --git a/tools/ci/jobs/clang70.sh b/tools/ci/jobs/clang70.sh
index fe5d919d9..8cdeeca35 100755
--- a/tools/ci/jobs/clang70.sh
+++ b/tools/ci/jobs/clang70.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-7
export CXX=clang++-7
diff --git a/tools/ci/jobs/clang70_tests.sh b/tools/ci/jobs/clang70_tests.sh
index 8c6832710..ad547dc61 100755
--- a/tools/ci/jobs/clang70_tests.sh
+++ b/tools/ci/jobs/clang70_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=clang-7
export CXX=clang++-7
diff --git a/tools/ci/jobs/clang_tidy.sh b/tools/ci/jobs/clang_tidy.sh
index 8bc7786ab..0c50d90fa 100755
--- a/tools/ci/jobs/clang_tidy.sh
+++ b/tools/ci/jobs/clang_tidy.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=tidy.log
diff --git a/tools/ci/jobs/cmake_gcc49.sh b/tools/ci/jobs/cmake_gcc49.sh
index 5b8563bec..5da5cac21 100755
--- a/tools/ci/jobs/cmake_gcc49.sh
+++ b/tools/ci/jobs/cmake_gcc49.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh
index cee689b48..b193fd4e3 100755
--- a/tools/ci/jobs/cpplint.sh
+++ b/tools/ci/jobs/cpplint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=cpplint.log
diff --git a/tools/ci/jobs/deheader.sh b/tools/ci/jobs/deheader.sh
index 462320e3b..f664b20c1 100755
--- a/tools/ci/jobs/deheader.sh
+++ b/tools/ci/jobs/deheader.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE2=logs/deheader2.log
diff --git a/tools/ci/jobs/deheader2.sh b/tools/ci/jobs/deheader2.sh
index e25385427..afd0f02c3 100755
--- a/tools/ci/jobs/deheader2.sh
+++ b/tools/ci/jobs/deheader2.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE2=logs/deheader2.log
diff --git a/tools/ci/jobs/doxygen.sh b/tools/ci/jobs/doxygen.sh
index db8855cdc..e0731ba2b 100755
--- a/tools/ci/jobs/doxygen.sh
+++ b/tools/ci/jobs/doxygen.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=doxygen.log
diff --git a/tools/ci/jobs/gcc10.sh b/tools/ci/jobs/gcc10.sh
index 0a48404b4..98647e7c2 100755
--- a/tools/ci/jobs/gcc10.sh
+++ b/tools/ci/jobs/gcc10.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_lto.sh b/tools/ci/jobs/gcc10_lto.sh
index 2dac75b98..12a61d1d3 100755
--- a/tools/ci/jobs/gcc10_lto.sh
+++ b/tools/ci/jobs/gcc10_lto.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_sanitize.sh b/tools/ci/jobs/gcc10_sanitize.sh
index 58942c0f4..f16d0b743 100755
--- a/tools/ci/jobs/gcc10_sanitize.sh
+++ b/tools/ci/jobs/gcc10_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_sanitize_tests.sh b/tools/ci/jobs/gcc10_sanitize_tests.sh
index 1dd672945..ea0a599e7 100755
--- a/tools/ci/jobs/gcc10_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc10_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_sdl2_tests_gcov.sh b/tools/ci/jobs/gcc10_sdl2_tests_gcov.sh
index 1f0380e79..c1691e8cb 100755
--- a/tools/ci/jobs/gcc10_sdl2_tests_gcov.sh
+++ b/tools/ci/jobs/gcc10_sdl2_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_silent.sh b/tools/ci/jobs/gcc10_silent.sh
index 1dd9f491f..e38dc1dfb 100755
--- a/tools/ci/jobs/gcc10_silent.sh
+++ b/tools/ci/jobs/gcc10_silent.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_tests.sh b/tools/ci/jobs/gcc10_tests.sh
index 3592e05e4..f80ec78d8 100755
--- a/tools/ci/jobs/gcc10_tests.sh
+++ b/tools/ci/jobs/gcc10_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_tests_gcov.sh b/tools/ci/jobs/gcc10_tests_gcov.sh
index 3f6c29c6f..ccd67180f 100755
--- a/tools/ci/jobs/gcc10_tests_gcov.sh
+++ b/tools/ci/jobs/gcc10_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc10_tests_simd.sh b/tools/ci/jobs/gcc10_tests_simd.sh
index 5a3db0063..a0ec5f67a 100755
--- a/tools/ci/jobs/gcc10_tests_simd.sh
+++ b/tools/ci/jobs/gcc10_tests_simd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-10
export CXX=g++-10
diff --git a/tools/ci/jobs/gcc3.sh b/tools/ci/jobs/gcc3.sh
index 41e53a30e..31b5f03ed 100755
--- a/tools/ci/jobs/gcc3.sh
+++ b/tools/ci/jobs/gcc3.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-3.4.6
export CXX=g++-3.4.6
diff --git a/tools/ci/jobs/gcc41.sh b/tools/ci/jobs/gcc41.sh
index 26b2add46..9685a3626 100755
--- a/tools/ci/jobs/gcc41.sh
+++ b/tools/ci/jobs/gcc41.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.1
export CXX=g++-4.1
diff --git a/tools/ci/jobs/gcc43.sh b/tools/ci/jobs/gcc43.sh
index 1f528b9ba..99e7b8a79 100755
--- a/tools/ci/jobs/gcc43.sh
+++ b/tools/ci/jobs/gcc43.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.3.6-r1
export CXX=g++-4.3.6-r1
diff --git a/tools/ci/jobs/gcc44.sh b/tools/ci/jobs/gcc44.sh
index eb71d9e93..55815e778 100755
--- a/tools/ci/jobs/gcc44.sh
+++ b/tools/ci/jobs/gcc44.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.4
export CXX=g++-4.4
diff --git a/tools/ci/jobs/gcc45.sh b/tools/ci/jobs/gcc45.sh
index f859d42fb..8235f0565 100755
--- a/tools/ci/jobs/gcc45.sh
+++ b/tools/ci/jobs/gcc45.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.5
export CXX=g++-4.5
diff --git a/tools/ci/jobs/gcc46.sh b/tools/ci/jobs/gcc46.sh
index f5880b0fb..59cd7184a 100755
--- a/tools/ci/jobs/gcc46.sh
+++ b/tools/ci/jobs/gcc46.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.6
export CXX=g++-4.6
diff --git a/tools/ci/jobs/gcc47.sh b/tools/ci/jobs/gcc47.sh
index bd11ac5b2..7af601aa8 100755
--- a/tools/ci/jobs/gcc47.sh
+++ b/tools/ci/jobs/gcc47.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.7
export CXX=g++-4.7
diff --git a/tools/ci/jobs/gcc47_c++11.sh b/tools/ci/jobs/gcc47_c++11.sh
index dc152e2b8..3860ee79e 100755
--- a/tools/ci/jobs/gcc47_c++11.sh
+++ b/tools/ci/jobs/gcc47_c++11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.7
export CXX=g++-4.7
diff --git a/tools/ci/jobs/gcc48.sh b/tools/ci/jobs/gcc48.sh
index 6535462ca..18ed066e0 100755
--- a/tools/ci/jobs/gcc48.sh
+++ b/tools/ci/jobs/gcc48.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.8
export CXX=g++-4.8
diff --git a/tools/ci/jobs/gcc48_c++11.sh b/tools/ci/jobs/gcc48_c++11.sh
index d441c49cc..9652f1fc1 100755
--- a/tools/ci/jobs/gcc48_c++11.sh
+++ b/tools/ci/jobs/gcc48_c++11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.8
export CXX=g++-4.8
diff --git a/tools/ci/jobs/gcc49.sh b/tools/ci/jobs/gcc49.sh
index a0f2fa315..f944e08cb 100755
--- a/tools/ci/jobs/gcc49.sh
+++ b/tools/ci/jobs/gcc49.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/gcc49_c++11.sh b/tools/ci/jobs/gcc49_c++11.sh
index 561f108f3..e9ecdc154 100755
--- a/tools/ci/jobs/gcc49_c++11.sh
+++ b/tools/ci/jobs/gcc49_c++11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/gcc49_sanitize.sh b/tools/ci/jobs/gcc49_sanitize.sh
index a30e9ccd8..f9ae60711 100755
--- a/tools/ci/jobs/gcc49_sanitize.sh
+++ b/tools/ci/jobs/gcc49_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/gcc49_sanitize_tests.sh b/tools/ci/jobs/gcc49_sanitize_tests.sh
index c6db10ef4..787022b13 100755
--- a/tools/ci/jobs/gcc49_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc49_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/gcc49_tests.sh b/tools/ci/jobs/gcc49_tests.sh
index c4796cedc..9303eb2e2 100755
--- a/tools/ci/jobs/gcc49_tests.sh
+++ b/tools/ci/jobs/gcc49_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-4.9
export CXX=g++-4.9
diff --git a/tools/ci/jobs/gcc5.sh b/tools/ci/jobs/gcc5.sh
index 2b0ae98e1..72d21ffe1 100755
--- a/tools/ci/jobs/gcc5.sh
+++ b/tools/ci/jobs/gcc5.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_c++11.sh b/tools/ci/jobs/gcc5_c++11.sh
index 2340109bb..6209b606c 100755
--- a/tools/ci/jobs/gcc5_c++11.sh
+++ b/tools/ci/jobs/gcc5_c++11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_h.sh b/tools/ci/jobs/gcc5_h.sh
index de392c73e..6072e7256 100755
--- a/tools/ci/jobs/gcc5_h.sh
+++ b/tools/ci/jobs/gcc5_h.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_sanitize.sh b/tools/ci/jobs/gcc5_sanitize.sh
index a51ebcb76..36c729cba 100755
--- a/tools/ci/jobs/gcc5_sanitize.sh
+++ b/tools/ci/jobs/gcc5_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_sanitize_tests.sh b/tools/ci/jobs/gcc5_sanitize_tests.sh
index 68920abd6..42acab57c 100755
--- a/tools/ci/jobs/gcc5_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc5_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_sdl2.sh b/tools/ci/jobs/gcc5_sdl2.sh
index 0ee213a57..e91e55d92 100755
--- a/tools/ci/jobs/gcc5_sdl2.sh
+++ b/tools/ci/jobs/gcc5_sdl2.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_sdl2_c++11.sh b/tools/ci/jobs/gcc5_sdl2_c++11.sh
index 5304249b3..8dee018f6 100755
--- a/tools/ci/jobs/gcc5_sdl2_c++11.sh
+++ b/tools/ci/jobs/gcc5_sdl2_c++11.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_sdl2_tests.sh b/tools/ci/jobs/gcc5_sdl2_tests.sh
index 5ec32437f..1fc66fc48 100755
--- a/tools/ci/jobs/gcc5_sdl2_tests.sh
+++ b/tools/ci/jobs/gcc5_sdl2_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_tarball.sh b/tools/ci/jobs/gcc5_tarball.sh
index bf7a9c656..c4536cca5 100755
--- a/tools/ci/jobs/gcc5_tarball.sh
+++ b/tools/ci/jobs/gcc5_tarball.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc5_tests.sh b/tools/ci/jobs/gcc5_tests.sh
index d53ad098c..3eadda77d 100755
--- a/tools/ci/jobs/gcc5_tests.sh
+++ b/tools/ci/jobs/gcc5_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-5
export CXX=g++-5
diff --git a/tools/ci/jobs/gcc6.sh b/tools/ci/jobs/gcc6.sh
index 1ef860994..2bb934330 100755
--- a/tools/ci/jobs/gcc6.sh
+++ b/tools/ci/jobs/gcc6.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_lto.sh b/tools/ci/jobs/gcc6_lto.sh
index 247c4d57f..7920db28c 100755
--- a/tools/ci/jobs/gcc6_lto.sh
+++ b/tools/ci/jobs/gcc6_lto.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_sanitize.sh b/tools/ci/jobs/gcc6_sanitize.sh
index c225ef2be..520028ae4 100755
--- a/tools/ci/jobs/gcc6_sanitize.sh
+++ b/tools/ci/jobs/gcc6_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_sanitize_tests.sh b/tools/ci/jobs/gcc6_sanitize_tests.sh
index 5a2015d01..ce3b12d80 100755
--- a/tools/ci/jobs/gcc6_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc6_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_sdl2_tests.sh b/tools/ci/jobs/gcc6_sdl2_tests.sh
index cd02e5cc4..80c2443ab 100755
--- a/tools/ci/jobs/gcc6_sdl2_tests.sh
+++ b/tools/ci/jobs/gcc6_sdl2_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_sdl2_tests_gcov.sh b/tools/ci/jobs/gcc6_sdl2_tests_gcov.sh
index 0d5f02f91..db879fcf1 100755
--- a/tools/ci/jobs/gcc6_sdl2_tests_gcov.sh
+++ b/tools/ci/jobs/gcc6_sdl2_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_silent.sh b/tools/ci/jobs/gcc6_silent.sh
index 2453c2bdc..41c96976c 100755
--- a/tools/ci/jobs/gcc6_silent.sh
+++ b/tools/ci/jobs/gcc6_silent.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_tarball_tests.sh b/tools/ci/jobs/gcc6_tarball_tests.sh
index 81e0c9817..bfec5c322 100755
--- a/tools/ci/jobs/gcc6_tarball_tests.sh
+++ b/tools/ci/jobs/gcc6_tarball_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_tests.sh b/tools/ci/jobs/gcc6_tests.sh
index 6b42c060a..8396df4a8 100755
--- a/tools/ci/jobs/gcc6_tests.sh
+++ b/tools/ci/jobs/gcc6_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_tests_gcov.sh b/tools/ci/jobs/gcc6_tests_gcov.sh
index 479a7ca21..521c4a75f 100755
--- a/tools/ci/jobs/gcc6_tests_gcov.sh
+++ b/tools/ci/jobs/gcc6_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc6_tests_simd.sh b/tools/ci/jobs/gcc6_tests_simd.sh
index 04f7d007e..886dd2971 100755
--- a/tools/ci/jobs/gcc6_tests_simd.sh
+++ b/tools/ci/jobs/gcc6_tests_simd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-6
export CXX=g++-6
diff --git a/tools/ci/jobs/gcc7.sh b/tools/ci/jobs/gcc7.sh
index 60fb60f72..8926c8644 100755
--- a/tools/ci/jobs/gcc7.sh
+++ b/tools/ci/jobs/gcc7.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_lto.sh b/tools/ci/jobs/gcc7_lto.sh
index 7de01c666..507e91ca2 100755
--- a/tools/ci/jobs/gcc7_lto.sh
+++ b/tools/ci/jobs/gcc7_lto.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_sanitize.sh b/tools/ci/jobs/gcc7_sanitize.sh
index 89c229199..d94d51bbd 100755
--- a/tools/ci/jobs/gcc7_sanitize.sh
+++ b/tools/ci/jobs/gcc7_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_sanitize_tests.sh b/tools/ci/jobs/gcc7_sanitize_tests.sh
index 735a70c87..bd5a2ab1e 100755
--- a/tools/ci/jobs/gcc7_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc7_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_sdl2_tests_gcov.sh b/tools/ci/jobs/gcc7_sdl2_tests_gcov.sh
index c6d1bcba9..486c2caa1 100755
--- a/tools/ci/jobs/gcc7_sdl2_tests_gcov.sh
+++ b/tools/ci/jobs/gcc7_sdl2_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_silent.sh b/tools/ci/jobs/gcc7_silent.sh
index cf4397004..dbde919e8 100755
--- a/tools/ci/jobs/gcc7_silent.sh
+++ b/tools/ci/jobs/gcc7_silent.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_tests.sh b/tools/ci/jobs/gcc7_tests.sh
index 0354f82f7..dcbc56476 100755
--- a/tools/ci/jobs/gcc7_tests.sh
+++ b/tools/ci/jobs/gcc7_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_tests_gcov.sh b/tools/ci/jobs/gcc7_tests_gcov.sh
index a0619d86b..72f85816a 100755
--- a/tools/ci/jobs/gcc7_tests_gcov.sh
+++ b/tools/ci/jobs/gcc7_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc7_tests_simd.sh b/tools/ci/jobs/gcc7_tests_simd.sh
index 4809cb27a..df5396c11 100755
--- a/tools/ci/jobs/gcc7_tests_simd.sh
+++ b/tools/ci/jobs/gcc7_tests_simd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-7
export CXX=g++-7
diff --git a/tools/ci/jobs/gcc8.sh b/tools/ci/jobs/gcc8.sh
index d7adc4794..15f2e0756 100755
--- a/tools/ci/jobs/gcc8.sh
+++ b/tools/ci/jobs/gcc8.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_lto.sh b/tools/ci/jobs/gcc8_lto.sh
index 05442106a..893c96194 100755
--- a/tools/ci/jobs/gcc8_lto.sh
+++ b/tools/ci/jobs/gcc8_lto.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_sanitize.sh b/tools/ci/jobs/gcc8_sanitize.sh
index 724cd2017..5a53038cb 100755
--- a/tools/ci/jobs/gcc8_sanitize.sh
+++ b/tools/ci/jobs/gcc8_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_sanitize_tests.sh b/tools/ci/jobs/gcc8_sanitize_tests.sh
index ed133d68d..ffc454fd4 100755
--- a/tools/ci/jobs/gcc8_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc8_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_sdl2_tests_gcov.sh b/tools/ci/jobs/gcc8_sdl2_tests_gcov.sh
index b26594f58..14110de8e 100755
--- a/tools/ci/jobs/gcc8_sdl2_tests_gcov.sh
+++ b/tools/ci/jobs/gcc8_sdl2_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_silent.sh b/tools/ci/jobs/gcc8_silent.sh
index 10366cb76..e1919e9e0 100755
--- a/tools/ci/jobs/gcc8_silent.sh
+++ b/tools/ci/jobs/gcc8_silent.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_tests.sh b/tools/ci/jobs/gcc8_tests.sh
index 9f8ebed35..406d3dcdd 100755
--- a/tools/ci/jobs/gcc8_tests.sh
+++ b/tools/ci/jobs/gcc8_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_tests_gcov.sh b/tools/ci/jobs/gcc8_tests_gcov.sh
index b639d2bbe..f55b4a978 100755
--- a/tools/ci/jobs/gcc8_tests_gcov.sh
+++ b/tools/ci/jobs/gcc8_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc8_tests_simd.sh b/tools/ci/jobs/gcc8_tests_simd.sh
index 5985cd29e..3a1258527 100755
--- a/tools/ci/jobs/gcc8_tests_simd.sh
+++ b/tools/ci/jobs/gcc8_tests_simd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-8
export CXX=g++-8
diff --git a/tools/ci/jobs/gcc9.sh b/tools/ci/jobs/gcc9.sh
index 9be711193..46df436fb 100755
--- a/tools/ci/jobs/gcc9.sh
+++ b/tools/ci/jobs/gcc9.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_lto.sh b/tools/ci/jobs/gcc9_lto.sh
index fbd6243a2..e61801604 100755
--- a/tools/ci/jobs/gcc9_lto.sh
+++ b/tools/ci/jobs/gcc9_lto.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_sanitize.sh b/tools/ci/jobs/gcc9_sanitize.sh
index 24d8b6ac5..43c679229 100755
--- a/tools/ci/jobs/gcc9_sanitize.sh
+++ b/tools/ci/jobs/gcc9_sanitize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_sanitize_tests.sh b/tools/ci/jobs/gcc9_sanitize_tests.sh
index c993f8d72..26057dba1 100755
--- a/tools/ci/jobs/gcc9_sanitize_tests.sh
+++ b/tools/ci/jobs/gcc9_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_sdl2_tests_gcov.sh b/tools/ci/jobs/gcc9_sdl2_tests_gcov.sh
index c6a4d9aec..30605535b 100755
--- a/tools/ci/jobs/gcc9_sdl2_tests_gcov.sh
+++ b/tools/ci/jobs/gcc9_sdl2_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_silent.sh b/tools/ci/jobs/gcc9_silent.sh
index 78ece1acd..c6a180b57 100755
--- a/tools/ci/jobs/gcc9_silent.sh
+++ b/tools/ci/jobs/gcc9_silent.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_tests.sh b/tools/ci/jobs/gcc9_tests.sh
index a0a75761c..94a7b170d 100755
--- a/tools/ci/jobs/gcc9_tests.sh
+++ b/tools/ci/jobs/gcc9_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_tests_gcov.sh b/tools/ci/jobs/gcc9_tests_gcov.sh
index 4a396d2b6..b2f26e3db 100755
--- a/tools/ci/jobs/gcc9_tests_gcov.sh
+++ b/tools/ci/jobs/gcc9_tests_gcov.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gcc9_tests_simd.sh b/tools/ci/jobs/gcc9_tests_simd.sh
index 074664be9..33349c9c7 100755
--- a/tools/ci/jobs/gcc9_tests_simd.sh
+++ b/tools/ci/jobs/gcc9_tests_simd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc-9
export CXX=g++-9
diff --git a/tools/ci/jobs/gccsnapshot.sh b/tools/ci/jobs/gccsnapshot.sh
index 056c236bd..c5972a914 100755
--- a/tools/ci/jobs/gccsnapshot.sh
+++ b/tools/ci/jobs/gccsnapshot.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc
export CXX=g++
diff --git a/tools/ci/jobs/gccsnapshot_sanitize_tests.sh b/tools/ci/jobs/gccsnapshot_sanitize_tests.sh
index ffeb999b3..7fb4829ba 100755
--- a/tools/ci/jobs/gccsnapshot_sanitize_tests.sh
+++ b/tools/ci/jobs/gccsnapshot_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc
export CXX=g++
diff --git a/tools/ci/jobs/gccsnapshot_sdl2.sh b/tools/ci/jobs/gccsnapshot_sdl2.sh
index a3b75867f..327bfbfc6 100755
--- a/tools/ci/jobs/gccsnapshot_sdl2.sh
+++ b/tools/ci/jobs/gccsnapshot_sdl2.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc
export CXX=g++
diff --git a/tools/ci/jobs/gccsnapshot_tests.sh b/tools/ci/jobs/gccsnapshot_tests.sh
index 1efd8e401..39fa13b39 100755
--- a/tools/ci/jobs/gccsnapshot_tests.sh
+++ b/tools/ci/jobs/gccsnapshot_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc
export CXX=g++
diff --git a/tools/ci/jobs/gitstats.sh b/tools/ci/jobs/gitstats.sh
index 26b756ad5..59c39ebbf 100755
--- a/tools/ci/jobs/gitstats.sh
+++ b/tools/ci/jobs/gitstats.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=gitstats.log
diff --git a/tools/ci/jobs/gitstatsh.sh b/tools/ci/jobs/gitstatsh.sh
index 4537920e4..376d31f43 100755
--- a/tools/ci/jobs/gitstatsh.sh
+++ b/tools/ci/jobs/gitstatsh.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=gitstatsh.log
diff --git a/tools/ci/jobs/imagemagiccheck.sh b/tools/ci/jobs/imagemagiccheck.sh
index ac512416b..564026f1c 100755
--- a/tools/ci/jobs/imagemagiccheck.sh
+++ b/tools/ci/jobs/imagemagiccheck.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source ./tools/ci/scripts/init.sh
diff --git a/tools/ci/jobs/mplint.sh b/tools/ci/jobs/mplint.sh
index 2208b3dad..66a056dba 100755
--- a/tools/ci/jobs/mplint.sh
+++ b/tools/ci/jobs/mplint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export CC=gcc
export CXX=g++
diff --git a/tools/ci/jobs/mxe_gcc5.sh b/tools/ci/jobs/mxe_gcc5.sh
index da3cb678a..733a4b08d 100755
--- a/tools/ci/jobs/mxe_gcc5.sh
+++ b/tools/ci/jobs/mxe_gcc5.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=mxe_gcc5.log
diff --git a/tools/ci/jobs/mxe_gcc5_tests.sh b/tools/ci/jobs/mxe_gcc5_tests.sh
index 364b2858f..11f4d46a4 100755
--- a/tools/ci/jobs/mxe_gcc5_tests.sh
+++ b/tools/ci/jobs/mxe_gcc5_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=mxe_gcc5.log
diff --git a/tools/ci/jobs/mxe_gcc6.sh b/tools/ci/jobs/mxe_gcc6.sh
index 7aa6d1e83..2bccabdb4 100755
--- a/tools/ci/jobs/mxe_gcc6.sh
+++ b/tools/ci/jobs/mxe_gcc6.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=mxe_gcc6.log
diff --git a/tools/ci/jobs/mxe_gcc6_tests.sh b/tools/ci/jobs/mxe_gcc6_tests.sh
index 81548bad2..49be17b7c 100755
--- a/tools/ci/jobs/mxe_gcc6_tests.sh
+++ b/tools/ci/jobs/mxe_gcc6_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=mxe_gcc6.log
diff --git a/tools/ci/jobs/nsiqcppstyle.sh b/tools/ci/jobs/nsiqcppstyle.sh
index 7721398ec..e1969e182 100755
--- a/tools/ci/jobs/nsiqcppstyle.sh
+++ b/tools/ci/jobs/nsiqcppstyle.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=nsiqcppstyle.log
diff --git a/tools/ci/jobs/pages.sh b/tools/ci/jobs/pages.sh
index b59f0bbc2..4e2a3fa76 100755
--- a/tools/ci/jobs/pages.sh
+++ b/tools/ci/jobs/pages.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LOGFILE=pages.log
diff --git a/tools/ci/jobs/pngcheck.sh b/tools/ci/jobs/pngcheck.sh
index 3f7467975..2fd0a18d5 100755
--- a/tools/ci/jobs/pngcheck.sh
+++ b/tools/ci/jobs/pngcheck.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source ./tools/ci/scripts/init.sh
diff --git a/tools/ci/jobs/xcode.sh b/tools/ci/jobs/xcode.sh
index 81bb0ff8d..b07148b13 100755
--- a/tools/ci/jobs/xcode.sh
+++ b/tools/ci/jobs/xcode.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
uname -a
sudo xcode-select -switch /Applications/${xcodename} || exit 1
diff --git a/tools/ci/scripts/azure/mxeremovefiles.sh b/tools/ci/scripts/azure/mxeremovefiles.sh
index 455829137..f279daee3 100755
--- a/tools/ci/scripts/azure/mxeremovefiles.sh
+++ b/tools/ci/scripts/azure/mxeremovefiles.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
rm -rf .git
rm -rf src
diff --git a/tools/ci/scripts/azure/mxetest.sh b/tools/ci/scripts/azure/mxetest.sh
index d92085173..30cf8342e 100755
--- a/tools/ci/scripts/azure/mxetest.sh
+++ b/tools/ci/scripts/azure/mxetest.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo docker login --help
docker login --help
diff --git a/tools/ci/scripts/checkldd.sh b/tools/ci/scripts/checkldd.sh
index e728fd85d..a8ff198e2 100755
--- a/tools/ci/scripts/checkldd.sh
+++ b/tools/ci/scripts/checkldd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "Custom libs linked"
grep "spm" "$(ldd $1)"
diff --git a/tools/ci/scripts/circleci/gcc5.sh b/tools/ci/scripts/circleci/gcc5.sh
index 42a7caaa4..2d5c3ed9b 100755
--- a/tools/ci/scripts/circleci/gcc5.sh
+++ b/tools/ci/scripts/circleci/gcc5.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/circleci/gcc6.sh b/tools/ci/scripts/circleci/gcc6.sh
index 99e38cb0e..904888b09 100755
--- a/tools/ci/scripts/circleci/gcc6.sh
+++ b/tools/ci/scripts/circleci/gcc6.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh b/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh
index 59d38ea25..afaae9234 100755
--- a/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh
+++ b/tools/ci/scripts/circleci/gcc6_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/circleci/gcc6_tests.sh b/tools/ci/scripts/circleci/gcc6_tests.sh
index dd7c2e79d..644f4b75f 100755
--- a/tools/ci/scripts/circleci/gcc6_tests.sh
+++ b/tools/ci/scripts/circleci/gcc6_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/circleci/gcc7.sh b/tools/ci/scripts/circleci/gcc7.sh
index a56f8bb42..e90268db1 100755
--- a/tools/ci/scripts/circleci/gcc7.sh
+++ b/tools/ci/scripts/circleci/gcc7.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh b/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh
index 4757fb0b1..1b3c9a8fa 100755
--- a/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh
+++ b/tools/ci/scripts/circleci/gcc7_sanitize_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/circleci/gcc7_tests.sh b/tools/ci/scripts/circleci/gcc7_tests.sh
index 8679f366c..0acab9a7b 100755
--- a/tools/ci/scripts/circleci/gcc7_tests.sh
+++ b/tools/ci/scripts/circleci/gcc7_tests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo "CI nodes: ${CIRCLE_NODE_TOTAL}"
echo "Current node: ${CIRCLE_NODE_INDEX}"
diff --git a/tools/ci/scripts/clang_tidy.sh b/tools/ci/scripts/clang_tidy.sh
index 1f1266f9d..6ee8b519b 100755
--- a/tools/ci/scripts/clang_tidy.sh
+++ b/tools/ci/scripts/clang_tidy.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
dir=`pwd`
diff --git a/tools/ci/scripts/clonesrc.sh b/tools/ci/scripts/clonesrc.sh
index 6c033b677..efb0596d3 100755
--- a/tools/ci/scripts/clonesrc.sh
+++ b/tools/ci/scripts/clonesrc.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
rm -rf manaplus || true
./tools/ci/scripts/retry.sh "git clone --branch master --depth ${GIT_DEPTH} https://gitlab.com/manaplus/manaplus.git manaplus" || exit 1
diff --git a/tools/ci/scripts/copylib.sh b/tools/ci/scripts/copylib.sh
index b50ab4832..d01b89ebc 100755
--- a/tools/ci/scripts/copylib.sh
+++ b/tools/ci/scripts/copylib.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export libname="$1_$2"
diff --git a/tools/ci/scripts/copymxedlls.sh b/tools/ci/scripts/copymxedlls.sh
index 2ddf16a23..f10afdb36 100755
--- a/tools/ci/scripts/copymxedlls.sh
+++ b/tools/ci/scripts/copymxedlls.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source ./tools/ci/scripts/winvars.sh || exit 1
source ./tools/ci/flags/mingw6.sh || exit 1
diff --git a/tools/ci/scripts/deheader.sh b/tools/ci/scripts/deheader.sh
index 619acc1c0..03ea0ee18 100755
--- a/tools/ci/scripts/deheader.sh
+++ b/tools/ci/scripts/deheader.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export var=$1
export name=${var%.*}
diff --git a/tools/ci/scripts/deheaderS.sh b/tools/ci/scripts/deheaderS.sh
index 8b76214f2..6f72ddb50 100755
--- a/tools/ci/scripts/deheaderS.sh
+++ b/tools/ci/scripts/deheaderS.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export var=$1
export name=${var%.*}
diff --git a/tools/ci/scripts/dockerretry.sh b/tools/ci/scripts/dockerretry.sh
index 22e38e574..121878cbb 100755
--- a/tools/ci/scripts/dockerretry.sh
+++ b/tools/ci/scripts/dockerretry.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# skip if we not in docker
if [[ ${CI_RUNNER_TAGS} != *"docker"* ]]; then
diff --git a/tools/ci/scripts/downloadlib.sh b/tools/ci/scripts/downloadlib.sh
index c2f7c5521..e65e78429 100755
--- a/tools/ci/scripts/downloadlib.sh
+++ b/tools/ci/scripts/downloadlib.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export zipname="lib.zip"
export libname="$1_$2"
diff --git a/tools/ci/scripts/exit.sh b/tools/ci/scripts/exit.sh
index 64b758ff1..1f13618c1 100755
--- a/tools/ci/scripts/exit.sh
+++ b/tools/ci/scripts/exit.sh
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
rm $ERRFILE
diff --git a/tools/ci/scripts/icccheckfile.sh b/tools/ci/scripts/icccheckfile.sh
index 8805d192a..1d490c6c0 100755
--- a/tools/ci/scripts/icccheckfile.sh
+++ b/tools/ci/scripts/icccheckfile.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
identify -verbose $1 | egrep -i "profile|iCCP" >/dev/null
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh
index 1a0ae84e5..beb68c2f7 100755
--- a/tools/ci/scripts/init.sh
+++ b/tools/ci/scripts/init.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export dir=$(pwd)
export ERRFILE=${dir}/logs/${LOGFILE}
diff --git a/tools/ci/scripts/patchsdl1.sh b/tools/ci/scripts/patchsdl1.sh
index b97e12bbd..cb4c9a9de 100755
--- a/tools/ci/scripts/patchsdl1.sh
+++ b/tools/ci/scripts/patchsdl1.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Fix compilation warning
sed -i 's|#define GL_GLEXT_VERSION 29|#ifndef GL_GLEXT_VERSION\n#define GL_GLEXT_VERSION 29\n#endif|' /usr/include/SDL/SDL_opengl.h
diff --git a/tools/ci/scripts/retry.sh b/tools/ci/scripts/retry.sh
index aaa50e983..e75b23440 100755
--- a/tools/ci/scripts/retry.sh
+++ b/tools/ci/scripts/retry.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
n=0
diff --git a/tools/ci/scripts/rundyecmd.sh b/tools/ci/scripts/rundyecmd.sh
index 57a229768..fc399f822 100755
--- a/tools/ci/scripts/rundyecmd.sh
+++ b/tools/ci/scripts/rundyecmd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function testdye {
rm test1.png || true
diff --git a/tools/ci/scripts/runtest.sh b/tools/ci/scripts/runtest.sh
index 41fb1c7c4..11c336cf8 100755
--- a/tools/ci/scripts/runtest.sh
+++ b/tools/ci/scripts/runtest.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function check_is_run {
kill -0 ${PID}
diff --git a/tools/ci/scripts/runtests.sh b/tools/ci/scripts/runtests.sh
index 90d3de2fa..96e5b69f5 100755
--- a/tools/ci/scripts/runtests.sh
+++ b/tools/ci/scripts/runtests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [[ ${CI_RUNNER_TAGS} != *"docker"* ]]; then
echo "Running from shell. Skipping run tests $*"
diff --git a/tools/ci/scripts/separateunittests.sh b/tools/ci/scripts/separateunittests.sh
index 6e69069e8..3e94272da 100755
--- a/tools/ci/scripts/separateunittests.sh
+++ b/tools/ci/scripts/separateunittests.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export LIST=./logs/testslist.txt
diff --git a/tools/ci/scripts/test.sh b/tools/ci/scripts/test.sh
index 4d4426780..908b8c93c 100755
--- a/tools/ci/scripts/test.sh
+++ b/tools/ci/scripts/test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
echo 1: $1
echo 2: $2
diff --git a/tools/ci/scripts/triggers.sh b/tools/ci/scripts/triggers.sh
index 76ddd90f4..1608537e7 100755
--- a/tools/ci/scripts/triggers.sh
+++ b/tools/ci/scripts/triggers.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function run {
echo "running pipeline for $1"
diff --git a/tools/ci/scripts/updaterepos.sh b/tools/ci/scripts/updaterepos.sh
index 99173a8fa..f0698fc19 100755
--- a/tools/ci/scripts/updaterepos.sh
+++ b/tools/ci/scripts/updaterepos.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [[ ${CI_RUNNER_TAGS} != *"docker"* ]]; then
echo "Running from shell. Skipping update repos"
diff --git a/tools/ci/scripts/winvars.sh b/tools/ci/scripts/winvars.sh
index 0b3281777..3491c2b76 100755
--- a/tools/ci/scripts/winvars.sh
+++ b/tools/ci/scripts/winvars.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export PATH=/mxe/usr/bin:/mxe/usr/x86_64-unknown-linux-gnu/bin:/mxe/usr/${CROSS}/bin:$PATH
diff --git a/tools/update-copyright.sh b/tools/update-copyright.sh
index 37979879a..d681ebb7f 100755
--- a/tools/update-copyright.sh
+++ b/tools/update-copyright.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (C) 2001-2010 Wormux Team.
# Copyright (C) 2010 The ManaWorld Development Team.
# Copyright (C) 2012-2016 The ManaPlus Developers.