[gtkmm-documentation/gtkmm-3-24] Shell scripts: Don't hard-code the path of bash



commit f90d504b0d1e212dc3c85d196b62e1be217bfce9
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Thu Aug 15 15:19:39 2019 +0200

    Shell scripts: Don't hard-code the path of bash
    
    bash isn't always installed in /bin. Scripts which don't require bash
    to work are converted to use sh, while scripts requiring bash features
    are changed to use PATH to find bash.
    
    See the mm-common!1 MR.

 examples/book/buildapp/step1/install-cmd.sh | 2 +-
 tools/meson_aux/compile-schemas.sh          | 2 +-
 tools/meson_aux/copy-to-subdir.sh           | 2 +-
 tools/meson_aux/extra-dist-cmd.sh           | 2 +-
 tools/meson_aux/tutorial-custom-cmd.sh      | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/examples/book/buildapp/step1/install-cmd.sh b/examples/book/buildapp/step1/install-cmd.sh
index 354009a..944fe55 100755
--- a/examples/book/buildapp/step1/install-cmd.sh
+++ b/examples/book/buildapp/step1/install-cmd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh -e
 
 # External command, intended to be called from
 #   ninja install-desktop-file
diff --git a/tools/meson_aux/compile-schemas.sh b/tools/meson_aux/compile-schemas.sh
index 2656089..c4b6f43 100755
--- a/tools/meson_aux/compile-schemas.sh
+++ b/tools/meson_aux/compile-schemas.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/sh -e
 
 # External command, intended to be called with custom_target() in meson.build
 
diff --git a/tools/meson_aux/copy-to-subdir.sh b/tools/meson_aux/copy-to-subdir.sh
index 7e82a6a..c5b934b 100755
--- a/tools/meson_aux/copy-to-subdir.sh
+++ b/tools/meson_aux/copy-to-subdir.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/sh -e
 
 # External command, intended to be called with custom_target() in meson.build
 
diff --git a/tools/meson_aux/extra-dist-cmd.sh b/tools/meson_aux/extra-dist-cmd.sh
index 01568a5..1c820e8 100755
--- a/tools/meson_aux/extra-dist-cmd.sh
+++ b/tools/meson_aux/extra-dist-cmd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/bin/sh -e
 
 # External command, intended to be called with add_dist_script() in meson.build
 
diff --git a/tools/meson_aux/tutorial-custom-cmd.sh b/tools/meson_aux/tutorial-custom-cmd.sh
index 71b37c8..411b306 100755
--- a/tools/meson_aux/tutorial-custom-cmd.sh
+++ b/tools/meson_aux/tutorial-custom-cmd.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env -S bash -e
 
 # External command, intended to be called with custom_target() in meson.build
 


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