mirror of
https://github.com/cert-manager/webhook-example.git
synced 2025-07-03 07:05:50 +02:00
25 lines
No EOL
574 B
Bash
Executable file
25 lines
No EOL
574 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
k8s_version=1.14.1
|
|
arch=amd64
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
|
os="linux"
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
os="darwin"
|
|
else
|
|
echo "OS '$OSTYPE' not supported." >&2
|
|
exit 1
|
|
fi
|
|
|
|
root=$(cd "`dirname $0`"/..; pwd)
|
|
output_dir="$root"/_out
|
|
archive_name="kubebuilder-tools-$k8s_version-$os-$arch.tar.gz"
|
|
archive_file="$output_dir/$archive_name"
|
|
archive_url="https://storage.googleapis.com/kubebuilder-tools/$archive_name"
|
|
|
|
mkdir -p "$output_dir"
|
|
curl -sL "$archive_url" -o "$archive_file"
|
|
tar -zxf "$archive_file" -C "$output_dir/" |