From d91e8af7027073088bce985d267286562923ea04 Mon Sep 17 00:00:00 2001 From: msk- Date: Thu, 21 Jan 2021 10:43:18 +0000 Subject: [PATCH] Use `/usr/bin/env bash` instead of `/bin/bash` for scripts to support more systems --- Makefile | 2 +- scripts/check-go-mod.sh | 2 +- scripts/check-multi-module.sh | 4 ++-- scripts/kyaml-pre-commit.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7390b45f7..c798140d1 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # Makefile for kustomize CLI and API. MYGOBIN := $(shell go env GOPATH)/bin -SHELL := /bin/bash +SHELL := /usr/bin/env bash export PATH := $(MYGOBIN):$(PATH) MODULES := '"cmd/config" "api/" "kustomize/" "kyaml/"' diff --git a/scripts/check-go-mod.sh b/scripts/check-go-mod.sh index eee8beb6b..1ff4180e1 100755 --- a/scripts/check-go-mod.sh +++ b/scripts/check-go-mod.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2019 The Kubernetes Authors. # SPDX-License-Identifier: Apache-2.0 diff --git a/scripts/check-multi-module.sh b/scripts/check-multi-module.sh index 3100d6da7..8e75e0793 100755 --- a/scripts/check-multi-module.sh +++ b/scripts/check-multi-module.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e @@ -20,4 +20,4 @@ else echo "Multi-module check skipped. No PULL_NUMBER provided. To run this check locally set PULL_NUMBER to the PR ID from GitHub." -fi \ No newline at end of file +fi diff --git a/scripts/kyaml-pre-commit.sh b/scripts/kyaml-pre-commit.sh index 30cab4d3d..583d4b78c 100755 --- a/scripts/kyaml-pre-commit.sh +++ b/scripts/kyaml-pre-commit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2019 The Kubernetes Authors. # SPDX-License-Identifier: Apache-2.0