Merge pull request #948 from twz123/posix-sh

build: Use POSIX sh for shell scripts
This commit is contained in:
Casey Callendrello 2023-10-16 17:25:04 +02:00 committed by GitHub
commit 4cf3da4ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env sh
set -e set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
if [ "$(uname)" == "Darwin" ]; then if [ "$(uname)" = "Darwin" ]; then
export GOOS="${GOOS:-linux}" export GOOS="${GOOS:-linux}"
fi fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
set -e set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
set -xe set -xe
SRC_DIR="${SRC_DIR:-$PWD}" SRC_DIR="${SRC_DIR:-$PWD}"

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
# #
# Run CNI plugin tests. # Run CNI plugin tests.
# #
@ -10,12 +10,12 @@ set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
# Build all plugins before testing # Build all plugins before testing
source ./build_linux.sh . ./build_linux.sh
echo "Running tests" echo "Running tests"
function testrun { testrun() {
sudo -E bash -c "umask 0; PATH=${GOPATH}/bin:$(pwd)/bin:${PATH} go test -race $@" sudo -E sh -c "umask 0; PATH=${GOPATH}/bin:$(pwd)/bin:${PATH} go test -race $*"
} }
COVERALLS=${COVERALLS:-""} COVERALLS=${COVERALLS:-""}

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env sh
# #
# Run CNI plugin tests. # Run CNI plugin tests.
# #
set -e set -e
cd "$(dirname "$0")" cd "$(dirname "$0")"
source ./build_windows.sh . ./build_windows.sh
echo "Running tests" echo "Running tests"