Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Commit

Permalink
Change bash scripts to be POSIX-compatible
Browse files Browse the repository at this point in the history
some Unix-like operating systems, namely Alpine, don't come with bash
preinstalled.

Signed-off-by: Sol Fisher Romanoff <[email protected]>
  • Loading branch information
Sol Fisher Romanoff committed Dec 1, 2021
1 parent f5425f2 commit 67cc777
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion images/scripts/degimpify.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Run this script on a directory to "degimpify" all XPM files
# within that directory (meaning any file ending with .XPM)
Expand Down
2 changes: 1 addition & 1 deletion linux/AppRun.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
# The AppImage runtime sets some special environment variables. We provide
# default values here in case the user tries to run this script outside an
# AppImage where the variables would otherwise be undefined.
Expand Down
2 changes: 1 addition & 1 deletion linux/build-environment/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

conan --version

Expand Down
2 changes: 1 addition & 1 deletion linux/check_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

version="@CPACK_PACKAGE_NAME@ v@CPACK_PACKAGE_VERSION@ @CPACK_AUDACITY_ARCH_LABEL@"

Expand Down
2 changes: 1 addition & 1 deletion linux/create_appimage.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

Expand Down
2 changes: 1 addition & 1 deletion locale/scripts/find-PO-no-Id.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Run this script on a directory to handle PO files with no id

Expand Down
2 changes: 1 addition & 1 deletion locale/scripts/locale_diagnostics.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Report how complete each translation catalog is

Expand Down
2 changes: 1 addition & 1 deletion locale/scripts/regen_POT_file.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Run this script with /locale/script/ as the current directory
set -o errexit

Expand Down
2 changes: 1 addition & 1 deletion mac/scripts/build_dist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh


# Function to retrieve a value from a plist
Expand Down
7 changes: 3 additions & 4 deletions mac/scripts/build_wxwidgets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# You can use this to build wxWidgets. Just run it from within the root of the
# wxWidgets source tree like so:
Expand Down Expand Up @@ -46,7 +46,7 @@ function bld
--with-regex=builtin \
--with-zlib=builtin \
--without-liblzma \
${@}
"$@"
make -j $(sysctl -n hw.ncpu) install
popd
}
Expand All @@ -56,8 +56,7 @@ function bld
arches="x86_64"
osver="$(sw_vers -productVersion)"
sdkver="$(xcrun --show-sdk-version)"
if [ "${osver}" \< "10.15" -a "${sdkver}" \< "10.14" ]
then
if expr "${osver}" \< "10.15" && expr "${sdkver}" \< "10.14"; then
arches="${arches} i386"
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/configure.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || echo >&2 "$0: Warning: Using ancient Bash version ${BASH_VERSION}."

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/environment.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

if [[ "$0" == "${BASH_SOURCE}" ]]; then
echo >&2 "$0: Please source this script instead of running it."
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/linux/split_debug_symbols.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

set -x
objcopy --only-keep-debug --compress-debug-section=zlib "${1}" "${1}.debug"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/macos/repeat_hdiutil.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/package.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

Expand Down
2 changes: 1 addition & 1 deletion scripts/maketarball.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Copyright 2003, 2004, 2005 Dominic Mazzoni and Matt Brubeck
# Distributed under the GNU General Public License 2.0.
Expand Down

0 comments on commit 67cc777

Please sign in to comment.