From 707fe77b5853e349117a6a160b24c7b93759df87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Thu, 5 Aug 2021 17:06:52 +0200 Subject: [PATCH] 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) --- hack/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hack/build.sh b/hack/build.sh index db03e45c8..0f7b0a020 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -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