Fix include and be more flexible for the script interpreter. (#1420)

Since we include now a test-infra script, which is Bash 4 based,
macOs user need to install Bash >= 4 e.g. via brew now.
The bash version coming with macOs is not good enough (3)
This commit is contained in:
Roland Huß 2021-08-05 17:06:52 +02:00 committed by GitHub
parent b3431e34c0
commit 707fe77b58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2018 The Knative Authors
#
@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
source $(dirname $0)/../vendor/knative.dev/hack/library.sh
set -o pipefail
source_dirs="cmd pkg test lib tools"
@ -347,6 +345,9 @@ if $(has_flag --debug); then
set -x
fi
# Shared funcs from hack repo
source $(basedir)/vendor/knative.dev/hack/library.sh
# Shared funcs with CI
source $(basedir)/hack/build-flags.sh