From b5f302ac6110f62b7a2f0aec559f1494e4fe1fe4 Mon Sep 17 00:00:00 2001 From: jo Date: Mon, 16 Aug 2021 14:21:46 +0200 Subject: [PATCH] Enhance bash shebangs --- airtime_mvc/tests/runtests.sh | 2 +- build.sh | 2 +- dev_tools/bootstrap_development_environment.sh | 2 +- dev_tools/liquidsoap_compile/liquidsoap-compile.sh | 2 +- dev_tools/liquidsoap_compile/run.sh | 2 +- dev_tools/postCommitBuildTrigger.sh | 2 +- dev_tools/propel_regenerate.sh | 2 +- dev_tools/release/release.sh | 2 +- dev_tools/toggle-pypo-debug.sh | 2 +- install | 2 +- installer/lxc-bootstrap | 2 +- installer/vagrant/centos.sh | 2 +- installer/vagrant/debian.sh | 2 +- .../airtime_analyzer/install/sysvinit/libretime-analyzer | 2 +- python_apps/airtime_analyzer/tools/ftp-upload-hook.sh | 2 +- python_apps/pypo/install/sysvinit/libretime-liquidsoap | 2 +- python_apps/pypo/install/sysvinit/libretime-playout | 2 +- uninstall | 2 +- utils/airtime-log | 2 +- utils/airtime-test-soundcard | 2 +- utils/airtime-test-stream | 2 +- utils/libretime-backup.sh | 2 +- utils/rabbitmq-update-pid.sh | 2 +- utils/rivendell-converter.sh | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/airtime_mvc/tests/runtests.sh b/airtime_mvc/tests/runtests.sh index 2d0d3005d..7213ecadb 100755 --- a/airtime_mvc/tests/runtests.sh +++ b/airtime_mvc/tests/runtests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Create a RabbitMQ airtime_tests user #This is necessary for tests to run diff --git a/build.sh b/build.sh index 3323a815b..457d3d6ad 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e composer install --no-dev --no-interaction git_build="" diff --git a/dev_tools/bootstrap_development_environment.sh b/dev_tools/bootstrap_development_environment.sh index 245c6d1bb..87abd88da 100755 --- a/dev_tools/bootstrap_development_environment.sh +++ b/dev_tools/bootstrap_development_environment.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Set up 3 way PO file merging, which we need for non-mainline branches cp scripts/git-merge-po /usr/local/bin diff --git a/dev_tools/liquidsoap_compile/liquidsoap-compile.sh b/dev_tools/liquidsoap_compile/liquidsoap-compile.sh index 60085831e..aedef80aa 100755 --- a/dev_tools/liquidsoap_compile/liquidsoap-compile.sh +++ b/dev_tools/liquidsoap_compile/liquidsoap-compile.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e apt-get install -y --force-yes lsb-release sudo dist=$(lsb_release -is) code=$(lsb_release -cs) diff --git a/dev_tools/liquidsoap_compile/run.sh b/dev_tools/liquidsoap_compile/run.sh index 285ca1d84..3a22ea54e 100755 --- a/dev_tools/liquidsoap_compile/run.sh +++ b/dev_tools/liquidsoap_compile/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash exec 2>&1 diff --git a/dev_tools/postCommitBuildTrigger.sh b/dev_tools/postCommitBuildTrigger.sh index 80e667126..c45d31ad4 100755 --- a/dev_tools/postCommitBuildTrigger.sh +++ b/dev_tools/postCommitBuildTrigger.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # the base url of the bamboo server baseurl="$1/updateAndBuild.action?buildKey=" diff --git a/dev_tools/propel_regenerate.sh b/dev_tools/propel_regenerate.sh index 1d5addec2..966afc08b 100755 --- a/dev_tools/propel_regenerate.sh +++ b/dev_tools/propel_regenerate.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e # Absolute path to this script SCRIPT=$(readlink -f $0) # Absolute directory this script is in diff --git a/dev_tools/release/release.sh b/dev_tools/release/release.sh index 21029611f..5993e0eef 100755 --- a/dev_tools/release/release.sh +++ b/dev_tools/release/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e #release.sh 1.8.2 #creates a libretime folder with a "1.8.2" suffix diff --git a/dev_tools/toggle-pypo-debug.sh b/dev_tools/toggle-pypo-debug.sh index 4734b542b..e8409bbaf 100755 --- a/dev_tools/toggle-pypo-debug.sh +++ b/dev_tools/toggle-pypo-debug.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ $EUID -ne 0 ]]; then echo "This script must be run as root." 1>&2 exit 1 diff --git a/install b/install index 54913f6de..3f4d192a5 100755 --- a/install +++ b/install @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e #-e Causes bash script to exit if any of the installers #return with a non-zero return value. diff --git a/installer/lxc-bootstrap b/installer/lxc-bootstrap index a5fa9df90..79eb227e3 100755 --- a/installer/lxc-bootstrap +++ b/installer/lxc-bootstrap @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e #-e Causes bash script to exit if any of the installers #return with a non-zero return value. diff --git a/installer/vagrant/centos.sh b/installer/vagrant/centos.sh index d93c45c41..3963c211c 100755 --- a/installer/vagrant/centos.sh +++ b/installer/vagrant/centos.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Additional Repos yum install -y epel-release diff --git a/installer/vagrant/debian.sh b/installer/vagrant/debian.sh index c08d0aad7..ff3ffcd63 100755 --- a/installer/vagrant/debian.sh +++ b/installer/vagrant/debian.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash DEBIAN_FRONTEND=noninteractive apt-get -y install alsa-utils usermod -a -G audio vagrant diff --git a/python_apps/airtime_analyzer/install/sysvinit/libretime-analyzer b/python_apps/airtime_analyzer/install/sysvinit/libretime-analyzer index 0b7493a46..31da8d5f7 100755 --- a/python_apps/airtime_analyzer/install/sysvinit/libretime-analyzer +++ b/python_apps/airtime_analyzer/install/sysvinit/libretime-analyzer @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ### BEGIN INIT INFO # Provides: libretime-analyzer diff --git a/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh b/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh index fb765afb8..01fe1b148 100755 --- a/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh +++ b/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh @@ -1,4 +1,4 @@ -#!/bin/bash -xv +#!/usr/bin/env bash -xv post_file() { #kill process after 30 minutes (360*5=30 minutes) diff --git a/python_apps/pypo/install/sysvinit/libretime-liquidsoap b/python_apps/pypo/install/sysvinit/libretime-liquidsoap index 7ef1a3d62..c90142c3a 100755 --- a/python_apps/pypo/install/sysvinit/libretime-liquidsoap +++ b/python_apps/pypo/install/sysvinit/libretime-liquidsoap @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ### BEGIN INIT INFO # Provides: airtime-liquidsoap diff --git a/python_apps/pypo/install/sysvinit/libretime-playout b/python_apps/pypo/install/sysvinit/libretime-playout index 6326ef9ad..7a0b121ed 100755 --- a/python_apps/pypo/install/sysvinit/libretime-playout +++ b/python_apps/pypo/install/sysvinit/libretime-playout @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ### BEGIN INIT INFO # Provides: airtime-playout diff --git a/uninstall b/uninstall index a1407fcfd..4d48a89ec 100755 --- a/uninstall +++ b/uninstall @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash -e # -e Causes bash script to exit if any of the steps # return with a non-zero return value. diff --git a/utils/airtime-log b/utils/airtime-log index 63f6ba4f6..ef7cc7928 100755 --- a/utils/airtime-log +++ b/utils/airtime-log @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Absolute path to this script SCRIPT=$(readlink -f $0) # Absolute directory this script is in diff --git a/utils/airtime-test-soundcard b/utils/airtime-test-soundcard index 1a389c082..67722cdf2 100755 --- a/utils/airtime-test-soundcard +++ b/utils/airtime-test-soundcard @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #------------------------------------------------------------------------------- # Copyright (c) 2011 Sourcefabric O.P.S. # diff --git a/utils/airtime-test-stream b/utils/airtime-test-stream index 9b3e7bf70..8634b2dc2 100755 --- a/utils/airtime-test-stream +++ b/utils/airtime-test-stream @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #------------------------------------------------------------------------------- # Copyright (c) 2011 Sourcefabric O.P.S. # diff --git a/utils/libretime-backup.sh b/utils/libretime-backup.sh index 7b1df87df..03f7602c1 100755 --- a/utils/libretime-backup.sh +++ b/utils/libretime-backup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -z "$1" ]; then ## Use config diff --git a/utils/rabbitmq-update-pid.sh b/utils/rabbitmq-update-pid.sh index cbaaa3f12..b46abb060 100755 --- a/utils/rabbitmq-update-pid.sh +++ b/utils/rabbitmq-update-pid.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash /etc/init.d/rabbitmq-server status | grep "\[{pid" pid_found="$?" diff --git a/utils/rivendell-converter.sh b/utils/rivendell-converter.sh index f150a4e22..a16b26c2d 100755 --- a/utils/rivendell-converter.sh +++ b/utils/rivendell-converter.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # A bash script to convert all Rivendell's audio-library to MP3, extract meta-tags from Rivendell's # database and set appropriate tags to each MP3 file.