Skip to content

Commit c5e12cf

Browse files
authored
adding back required install-kustomize.sh file (#200)
Issue #, if available: fixes aws-controllers-k8s/community#963 Description of changes: The `install-kustomize.sh` was previously in the `community` repo and should live in the `code-generator` repo so that the `olm` scripts can execute properly By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent e4d2ea4 commit c5e12cf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

scripts/install-kustomize.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
# ./scripts/install-kustomize.sh
4+
#
5+
# Installs the latest version kustomize if not installed.
6+
#
7+
# NOTE: uses `sudo mv` to relocate a downloaded binary to /usr/local/bin/kustomize
8+
9+
set -eo pipefail
10+
11+
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
12+
ROOT_DIR="$SCRIPTS_DIR/.."
13+
14+
source "$SCRIPTS_DIR/lib/common.sh"
15+
16+
if ! is_installed kustomize ; then
17+
__kustomize_url="https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
18+
echo -n "installing kustomize from $__kustomize_url ... "
19+
curl --silent "$__kustomize_url" | bash 1>/dev/null
20+
chmod +x kustomize
21+
sudo mv kustomize /usr/local/bin/kustomize
22+
echo "ok."
23+
fi

0 commit comments

Comments
 (0)