[mutter/wip/lantw/fix-meson-build-on-freebsd: 4/4] build: Don't hardcode the path of bash



commit b2e75b5da03a7d28e72346ff61b927a736bc65b9
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Sat Dec 1 12:04:26 2018 +0800

    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"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]