build: Explicitly use bash for shell scripts
VPP requires bash for all shell scripts. Align shebang lines in build
and test scripts to look up the location of bash rather than hard coding
'/bin/bash'.
Look up the location of bash for makefiles.
Type: improvement
Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24
Signed-off-by: Tom Jones <thj@freebsd.org>
diff --git a/test/scripts/compress_failed.sh b/test/scripts/compress_failed.sh
index ff17d24..7e2cd9c 100755
--- a/test/scripts/compress_failed.sh
+++ b/test/scripts/compress_failed.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [ "$(ls -A ${FAILED_DIR})" ]
then
diff --git a/test/scripts/run.sh b/test/scripts/run.sh
index 51c1c62..504edd6 100755
--- a/test/scripts/run.sh
+++ b/test/scripts/run.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
ff="0"
items=
diff --git a/test/scripts/run_in_venv_with_cleanup.sh b/test/scripts/run_in_venv_with_cleanup.sh
index af32f87..3f9d44f 100755
--- a/test/scripts/run_in_venv_with_cleanup.sh
+++ b/test/scripts/run_in_venv_with_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
rv=0
diff --git a/test/scripts/setsid_wrapper.sh b/test/scripts/setsid_wrapper.sh
index 030c3b0..550c7b9 100755
--- a/test/scripts/setsid_wrapper.sh
+++ b/test/scripts/setsid_wrapper.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
cmd=$1
force_foreground=$2
diff --git a/test/scripts/socket_test.sh b/test/scripts/socket_test.sh
index b94a2f3..3ba739a 100755
--- a/test/scripts/socket_test.sh
+++ b/test/scripts/socket_test.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
#
# socket_test.sh -- script to run socket tests.
#
diff --git a/test/scripts/test-loop.sh b/test/scripts/test-loop.sh
index 51f5d5c..b825f2b 100755
--- a/test/scripts/test-loop.sh
+++ b/test/scripts/test-loop.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function usage() {
echo "$0" 1>&2