From ba72994b4172dc39cbcef5d20c221fce5cb838ec Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 13 Jun 2018 14:12:52 -0400 Subject: [PATCH] common: Fix bash shell script invocation `#!/usr/bin/env bash` should be used to avoid hard paths. To address: dockcross-manylinux-x64: bad interpreter: /bin/bash^M: no such file or directory --- README.rst | 2 +- imagefiles/build-and-install-cmake.sh | 2 +- imagefiles/build-and-install-curl.sh | 2 +- imagefiles/build-and-install-git.sh | 2 +- imagefiles/build-and-install-ninja.sh | 2 +- imagefiles/build-and-install-openssh.sh | 2 +- imagefiles/build-and-install-openssl.sh | 2 +- imagefiles/ccmake.sh | 2 +- imagefiles/cmake.sh | 2 +- imagefiles/dockcross | 2 +- imagefiles/entrypoint.sh | 2 +- imagefiles/install-cmake-binary.sh | 2 +- imagefiles/install-crosstool-ng-toolchain.sh | 2 +- imagefiles/install-gosu-binary.sh | 2 +- imagefiles/install-liquidprompt-binary.sh | 2 +- imagefiles/install-python-packages.sh | 2 +- imagefiles/utils.sh | 2 +- linux-x86/i686-linux-gnu-as.sh | 2 +- linux-x86/i686-linux-gnu.sh | 2 +- manylinux-common/install-python-packages.sh | 2 +- manylinux-common/pre_exec.sh | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.rst b/README.rst index c431cfa..2fcf0b2 100644 --- a/README.rst +++ b/README.rst @@ -302,7 +302,7 @@ Per-project dockcross configuration If a shell script named ``.dockcross`` is found in the current directory where the dockcross script is started, it is executed before the dockcross script ``command`` argument. The shell script is expected to have a shebang like -``#!/bin/bash``. +``#!/usr/bin/env bash``. For example, commands like ``git config --global advice.detachedHead false`` can be added to this script. diff --git a/imagefiles/build-and-install-cmake.sh b/imagefiles/build-and-install-cmake.sh index 6c1ec61..ea92db3 100755 --- a/imagefiles/build-and-install-cmake.sh +++ b/imagefiles/build-and-install-cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/imagefiles/build-and-install-curl.sh b/imagefiles/build-and-install-curl.sh index 59fc281..27e3778 100755 --- a/imagefiles/build-and-install-curl.sh +++ b/imagefiles/build-and-install-curl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/imagefiles/build-and-install-git.sh b/imagefiles/build-and-install-git.sh index fb7a8c2..10b3bda 100755 --- a/imagefiles/build-and-install-git.sh +++ b/imagefiles/build-and-install-git.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/imagefiles/build-and-install-ninja.sh b/imagefiles/build-and-install-ninja.sh index 87d96af..df4cab6 100755 --- a/imagefiles/build-and-install-ninja.sh +++ b/imagefiles/build-and-install-ninja.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Configure, build and install ninja diff --git a/imagefiles/build-and-install-openssh.sh b/imagefiles/build-and-install-openssh.sh index ebf54fc..6fae766 100755 --- a/imagefiles/build-and-install-openssh.sh +++ b/imagefiles/build-and-install-openssh.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/imagefiles/build-and-install-openssl.sh b/imagefiles/build-and-install-openssl.sh index 3aa736c..b9044c1 100755 --- a/imagefiles/build-and-install-openssl.sh +++ b/imagefiles/build-and-install-openssl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Configure, build and install OpenSSL # diff --git a/imagefiles/ccmake.sh b/imagefiles/ccmake.sh index 6b009de..4677d0b 100755 --- a/imagefiles/ccmake.sh +++ b/imagefiles/ccmake.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Always pass the CMAKE_TOOLCHAIN_FILE variable to CMake when inside a # dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is diff --git a/imagefiles/cmake.sh b/imagefiles/cmake.sh index 2a61915..fb21172 100755 --- a/imagefiles/cmake.sh +++ b/imagefiles/cmake.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # Always pass the CMAKE_TOOLCHAIN_FILE variable to CMake when inside a # dockcross environment -- the CMAKE_TOOLCHAIN_FILE environmental variable is diff --git a/imagefiles/dockcross b/imagefiles/dockcross index fc5599d..ec31d0e 100755 --- a/imagefiles/dockcross +++ b/imagefiles/dockcross @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash DEFAULT_DOCKCROSS_IMAGE=dockcross/base # DO NOT MOVE THIS LINE (see entrypoint.sh) diff --git a/imagefiles/entrypoint.sh b/imagefiles/entrypoint.sh index 13886c3..226e3dd 100755 --- a/imagefiles/entrypoint.sh +++ b/imagefiles/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This is the entrypoint script for the dockerfile. Executed in the # container at runtime. diff --git a/imagefiles/install-cmake-binary.sh b/imagefiles/install-cmake-binary.sh index 575775f..9c34087 100755 --- a/imagefiles/install-cmake-binary.sh +++ b/imagefiles/install-cmake-binary.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex set -o pipefail diff --git a/imagefiles/install-crosstool-ng-toolchain.sh b/imagefiles/install-crosstool-ng-toolchain.sh index ccf535c..728c68a 100755 --- a/imagefiles/install-crosstool-ng-toolchain.sh +++ b/imagefiles/install-crosstool-ng-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script operates in a current working directory. It downloads # "crosstool-ng", installs the base package, and then configures and installs diff --git a/imagefiles/install-gosu-binary.sh b/imagefiles/install-gosu-binary.sh index 8c9153b..61d74cf 100755 --- a/imagefiles/install-gosu-binary.sh +++ b/imagefiles/install-gosu-binary.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex set -o pipefail diff --git a/imagefiles/install-liquidprompt-binary.sh b/imagefiles/install-liquidprompt-binary.sh index ef18833..4b2014d 100755 --- a/imagefiles/install-liquidprompt-binary.sh +++ b/imagefiles/install-liquidprompt-binary.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/imagefiles/install-python-packages.sh b/imagefiles/install-python-packages.sh index 1b44460..1f29dcf 100755 --- a/imagefiles/install-python-packages.sh +++ b/imagefiles/install-python-packages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -o pipefail diff --git a/imagefiles/utils.sh b/imagefiles/utils.sh index 2122f69..52fa08e 100644 --- a/imagefiles/utils.sh +++ b/imagefiles/utils.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/linux-x86/i686-linux-gnu-as.sh b/linux-x86/i686-linux-gnu-as.sh index 8fc21ef..0ce6576 100644 --- a/linux-x86/i686-linux-gnu-as.sh +++ b/linux-x86/i686-linux-gnu-as.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash exec ${0/${CROSS_TRIPLE}-/x86_64-linux-gnu-} --32 "$@" diff --git a/linux-x86/i686-linux-gnu.sh b/linux-x86/i686-linux-gnu.sh index de2a91f..fd7fb8e 100644 --- a/linux-x86/i686-linux-gnu.sh +++ b/linux-x86/i686-linux-gnu.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash exec ${0/*${TOOLCHAIN}-/\/usr\/bin\/x86_64-linux-gnu-} -m32 "$@" diff --git a/manylinux-common/install-python-packages.sh b/manylinux-common/install-python-packages.sh index 9e5ae31..5741e6a 100755 --- a/manylinux-common/install-python-packages.sh +++ b/manylinux-common/install-python-packages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for PIP in /opt/python/*/bin/pip; do $PIP install --disable-pip-version-check --upgrade pip diff --git a/manylinux-common/pre_exec.sh b/manylinux-common/pre_exec.sh index f5350a5..6b4abb8 100755 --- a/manylinux-common/pre_exec.sh +++ b/manylinux-common/pre_exec.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash for DIR in /opt/python/*/lib/python*/site-packages; do chown -R $BUILDER_UID:$BUILDER_GID $DIR