diff --git a/scripts/build b/scripts/build index 01c5b52525..fed96357ad 100755 --- a/scripts/build +++ b/scripts/build @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e # Ensure we are in root directory if [[ $(uname) == "Darwin" ]]; then diff --git a/scripts/build-appimage b/scripts/build-appimage index 0bc94c9a14..3e3b88c207 100755 --- a/scripts/build-appimage +++ b/scripts/build-appimage @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e echo -e "\033[0;36mBuilding AppImage for OpenRCT2...\033[0m" diff --git a/scripts/build-installer b/scripts/build-installer index 01a6784de3..bc18c336b4 100755 --- a/scripts/build-installer +++ b/scripts/build-installer @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e if [[ "$#" -gt 2 || "$1" == "-h" ]]; then echo 'Create a Windows installer for OpenRCT2' diff --git a/scripts/build-portable b/scripts/build-portable index bd4460cfa1..50b85d251e 100755 --- a/scripts/build-portable +++ b/scripts/build-portable @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then # Create a Windows symbols archive for OpenRCT2 diff --git a/scripts/build-symbols b/scripts/build-symbols index 5fede436c6..8525cf83f1 100755 --- a/scripts/build-symbols +++ b/scripts/build-symbols @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e # Check 7z or zip is available if [ -x "$(command -v 7z)" ]; then diff --git a/scripts/check-code-formatting b/scripts/check-code-formatting index 1f79900917..823f811a37 100755 --- a/scripts/check-code-formatting +++ b/scripts/check-code-formatting @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/usr/bin/env sh + +set -e readlink_bin='readlink' diff --git a/scripts/create-macos-universal b/scripts/create-macos-universal index 2b8f94a412..185ccf6ff1 100755 --- a/scripts/create-macos-universal +++ b/scripts/create-macos-universal @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e echo "Creating macOS universal app bundle" # create app skeleton diff --git a/scripts/get-discord-rpc b/scripts/get-discord-rpc index cd785ff567..4e8ea55891 100755 --- a/scripts/get-discord-rpc +++ b/scripts/get-discord-rpc @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e if [[ $(uname) == "Linux" ]]; then basedir="$(readlink -f `dirname $0`/..)" diff --git a/scripts/install-nsis b/scripts/install-nsis index a31d6e3d18..0c815cd867 100755 --- a/scripts/install-nsis +++ b/scripts/install-nsis @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e if [[ "$#" -ne 0 && "$#" -ne 2 ]]; then echo 'Install a portable version of NSIS which can build the OpenRCT2 Windows installer.' diff --git a/scripts/linux/build-appimage-docker.sh b/scripts/linux/build-appimage-docker.sh index 4f5c3897d9..87bd3e3df8 100755 --- a/scripts/linux/build-appimage-docker.sh +++ b/scripts/linux/build-appimage-docker.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash + +set -ex REPO_ROOT=$(readlink -f $(dirname "$0")/../..) diff --git a/scripts/linux/build-appimage.sh b/scripts/linux/build-appimage.sh index cf37d7a365..5c19b96d23 100755 --- a/scripts/linux/build-appimage.sh +++ b/scripts/linux/build-appimage.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ex +#!/usr/bin/env bash + +set -ex # use RAM disk if possible if [ -z "$CI" ] && [ -d /dev/shm ]; then diff --git a/scripts/run-testpaint b/scripts/run-testpaint index de0968afc3..9f5cc22a88 100755 --- a/scripts/run-testpaint +++ b/scripts/run-testpaint @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e # Ensure we are in root directory basedir="$(readlink -f `dirname $0`/..)" diff --git a/scripts/run-tests b/scripts/run-tests index e02f7d926b..ec0bd8adbc 100755 --- a/scripts/run-tests +++ b/scripts/run-tests @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e # Ensure we are in root directory if [[ $(uname) == "Darwin" ]]; then diff --git a/scripts/setenv b/scripts/setenv index 8ca470d362..f8b1e86a4d 100755 --- a/scripts/setenv +++ b/scripts/setenv @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash + +set -e # This sets up more environment variables using the existing environment # It should be dot sourced into your environment diff --git a/scripts/upload-backtrace-symbols b/scripts/upload-backtrace-symbols index e437817d1c..8022d3a843 100755 --- a/scripts/upload-backtrace-symbols +++ b/scripts/upload-backtrace-symbols @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e if [[ "$#" -ne 1 ]]; then echo 'Upload OpenRCT2 debug symbols to https://backtrace.io.' diff --git a/scripts/upload-build b/scripts/upload-build index 251df1a897..5c0318e16b 100755 --- a/scripts/upload-build +++ b/scripts/upload-build @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e if [[ "$#" -ne 4 && "$#" -ne 5 ]]; then echo 'Upload an OpenRCT2 build to openrct2.org.' diff --git a/scripts/vstool b/scripts/vstool index e96d4cf708..c1d46e7054 100755 --- a/scripts/vstool +++ b/scripts/vstool @@ -1,3 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash + +set -e vstool.cmd $@