mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Made update-codegen script crossplatform
This commit is contained in:
parent
c22add9969
commit
9e8540f280
1 changed files with 7 additions and 1 deletions
|
@ -3,9 +3,15 @@ set -o errexit
|
|||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
case "$(uname -s)" in
|
||||
Linux*) linkutil=readlink;;
|
||||
Darwin*) linkutil=greadlink;;
|
||||
*) machine="UNKNOWN:${unameOut}"
|
||||
esac
|
||||
|
||||
# get nirmata root
|
||||
NIRMATA_DIR=$(dirname ${BASH_SOURCE})/..
|
||||
NIRMATA_ROOT=$(greadlink -f ${NIRMATA_DIR})
|
||||
NIRMATA_ROOT=$(${linkutil} -f ${NIRMATA_DIR})
|
||||
|
||||
# get relative path to code generation script
|
||||
CODEGEN_PKG=${NIRMATA_DIR}/vendor/k8s.io/code-generator
|
||||
|
|
Loading…
Add table
Reference in a new issue