From f8fa4213f1721f3c5e1e0bd027fb7153d60986e5 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 23 Jul 2018 15:06:04 -0700 Subject: [PATCH] tools: use /usr/bin/env bash instead of /bin/bash These commands fail on systems that do not have bash under /bin Signed-off-by: William Casarin --- tools/check-includes.sh | 2 +- tools/check-manpage.sh | 2 +- tools/check-markdown.sh | 2 +- tools/check-setup_locale.sh | 2 +- tools/check-spelling.sh | 2 +- tools/docker-entrypoint.sh | 2 +- tools/mockup.sh | 2 +- tools/rel.sh | 2 +- tools/update-mocks.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/check-includes.sh b/tools/check-includes.sh index 9de36c1fb..9be58bd21 100755 --- a/tools/check-includes.sh +++ b/tools/check-includes.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash EXIT_CODE=0 diff --git a/tools/check-manpage.sh b/tools/check-manpage.sh index 50f917edb..fe42d4724 100755 --- a/tools/check-manpage.sh +++ b/tools/check-manpage.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # Needs bash for process substitition, ie <( if [ $# != 2 ]; then diff --git a/tools/check-markdown.sh b/tools/check-markdown.sh index 5f3825070..612988807 100755 --- a/tools/check-markdown.sh +++ b/tools/check-markdown.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if ! diff -u <(grep -E 'sudo apt-get install .*git' README.md) \ <(grep -E 'sudo apt-get install .*git' doc/INSTALL.md); then diff --git a/tools/check-setup_locale.sh b/tools/check-setup_locale.sh index a4a39674f..c89a564dd 100755 --- a/tools/check-setup_locale.sh +++ b/tools/check-setup_locale.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash EXIT_CODE=0 for FILE in $(git grep -lE 'int main\(' | grep -vE '^ccan/'); do diff --git a/tools/check-spelling.sh b/tools/check-spelling.sh index c80669ca6..e32ce5734 100755 --- a/tools/check-spelling.sh +++ b/tools/check-spelling.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if git --no-pager grep -nHiE 'l[ightn]{6}g|l[ightn]{8}g|ilghtning|lgihtning|lihgtning|ligthning|lighnting|lightinng|lightnnig|lightnign' -- . ':!tools/check-spelling.sh'; then echo "Identified a likely misspelling of the word \"lightning\" (see above). Please fix." diff --git a/tools/docker-entrypoint.sh b/tools/docker-entrypoint.sh index bb55d6856..47e5c8cc4 100755 --- a/tools/docker-entrypoint.sh +++ b/tools/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash : "${EXPOSE_TCP:=false}" diff --git a/tools/mockup.sh b/tools/mockup.sh index d5945319f..3f4a6cba4 100755 --- a/tools/mockup.sh +++ b/tools/mockup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ $# -eq 0 ]; then # With no args, read stdin to scrape compiler output. diff --git a/tools/rel.sh b/tools/rel.sh index 64ad31be1..e27b7467c 100755 --- a/tools/rel.sh +++ b/tools/rel.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash from=${1} to=${2} diff --git a/tools/update-mocks.sh b/tools/update-mocks.sh index 337bfdadf..f1b26cde6 100755 --- a/tools/update-mocks.sh +++ b/tools/update-mocks.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Script to rewrite the autogenerated mocks in a unit test between # /* AUTOGENERATED MOCKS START */ and /* AUTOGENERATED MOCKS END */ # based on link failures.