From b2e75b5da03a7d28e72346ff61b927a736bc65b9 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Sat, 1 Dec 2018 12:04:26 +0800 Subject: [PATCH] build: Don't hardcode the path of bash Bash is not always installed in /bin and we should not hardcode the path of it in source code which is expected to be built on many operating systems and distributions. Since most scripts using #!/bin/bash here doesn't have any bashism, they can be converted to #!/bin/sh instead of using /usr/bin/env trick. --- clutter/tests/interactive/meson/gen-test-unit-names.sh | 2 +- cogl/tests/conform/meson/find-conform-unit-tests.sh | 2 +- cogl/tests/run-tests.sh | 2 +- cogl/tests/unit/meson/find-unit-tests.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clutter/tests/interactive/meson/gen-test-unit-names.sh b/clutter/tests/interactive/meson/gen-test-unit-names.sh index 1912d4695..1e21d3589 100755 --- a/clutter/tests/interactive/meson/gen-test-unit-names.sh +++ b/clutter/tests/interactive/meson/gen-test-unit-names.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh outputfile=$1 shift diff --git a/cogl/tests/conform/meson/find-conform-unit-tests.sh b/cogl/tests/conform/meson/find-conform-unit-tests.sh index 64ba14183..2c523aea9 100755 --- a/cogl/tests/conform/meson/find-conform-unit-tests.sh +++ b/cogl/tests/conform/meson/find-conform-unit-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh inputfile="$1" outputfile="$2" diff --git a/cogl/tests/run-tests.sh b/cogl/tests/run-tests.sh index 2316c7b0d..d5b839538 100755 --- a/cogl/tests/run-tests.sh +++ b/cogl/tests/run-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if test -z "$G_DEBUG"; then G_DEBUG=fatal-warnings diff --git a/cogl/tests/unit/meson/find-unit-tests.sh b/cogl/tests/unit/meson/find-unit-tests.sh index c06aebc97..14370fb73 100755 --- a/cogl/tests/unit/meson/find-unit-tests.sh +++ b/cogl/tests/unit/meson/find-unit-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh inputfile="$1" outputfile="$2"