From b710a76818fe96491b621c4652d2b81e8f7835ed Mon Sep 17 00:00:00 2001 From: Jeff Regan Date: Thu, 5 Dec 2019 14:02:16 -0800 Subject: [PATCH] Add kustomize install script. --- docs/INSTALL.md | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 697d39673..e1db8bcd8 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -10,22 +10,15 @@ Or... ## Quickly curl the latest binary -``` -# pick one -opsys=darwin -opsys=windows -opsys=linux +This script attempts to do the right thing: +for linux, darwin or windows: -curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases |\ - grep browser_download |\ - grep $opsys |\ - cut -d '"' -f 4 |\ - grep /kustomize/v |\ - sort | tail -n 1 |\ - xargs curl -O -L -tar xzf ./kustomize_v*_${opsys}_amd64.tar.gz -./kustomize version ``` +curl https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh | sh +``` + +See this [discussion of _curl | sh_](https://www.arp242.net/curl-to-sh.html). + ## Try `go` This method is more to show off how the `go` tool works,