Skip to content
Snippets Groups Projects
Commit 1f48672d authored by nimrod's avatar nimrod
Browse files

Now works on OpenBSD (and hopefully on ARM, needs testing).

parent 7d2eba50
No related branches found
No related tags found
No related merge requests found
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
tempdir != mktemp -d tempdir != mktemp -d
os != uname -s | awk '{print tolower($$0)}' os != uname -s | awk '{print tolower($$0)}'
arch := amd64 arch != uname -m
goarch != eval $$(go env) && echo "$$GOARCH"
ssh_configs != find ".ssh/config.d/" -type f \! -name '.*' ssh_configs != find ".ssh/config.d/" -type f \! -name '.*'
curl = curl --location --silent --fail curl = curl --location --silent --fail
download = $(curl) --output $@ download = $(curl) --output $@
all: vendored generated binaries all: binaries vendored generated
vendored: .config/pythonrc.py .bash_completion.d/aws .bash_completion.d/docker-compose .bash_completion.d/docker-machine.bash .bash_completion.d/docker-machine.bash .travis/travis.sh .bash_completion.d/molecule vendored: .config/pythonrc.py .bash_completion.d/aws .bash_completion.d/docker-compose .bash_completion.d/docker-machine.bash .bash_completion.d/docker-machine.bash .travis/travis.sh .bash_completion.d/molecule
generated: .ssh/config .bash_completion.d/helm .bash_completion.d/kops .bash_completion.d/kubectl .bash_completion.d/kompose .bash_completion.d/minikube .bash_completion.d/pipenv .bash_completion.d/pandoc generated: .ssh/config .bash_completion.d/helm .bash_completion.d/kops .bash_completion.d/kubectl .bash_completion.d/kompose .bash_completion.d/minikube .bash_completion.d/pipenv .bash_completion.d/pandoc
binaries: .local/share/bfg/bfg.jar .local/bin/rke .local/bin/docker-machine .local/bin/packer .local/bin/terraform .local/bin/vault .local/bin/kubectl .local/bin/kops .local/bin/kompose .local/bin/minikube .local/bin/docker-machine-driver-kvm2 binaries: .local/share/bfg/bfg.jar .local/bin/rke .local/bin/docker-machine .local/bin/packer .local/bin/terraform .local/bin/vault .local/bin/kubectl .local/bin/kops .local/bin/kompose .local/bin/minikube .local/bin/docker-machine-driver-kvm2
...@@ -35,54 +36,56 @@ binaries: .local/share/bfg/bfg.jar .local/bin/rke .local/bin/docker-machine .loc ...@@ -35,54 +36,56 @@ binaries: .local/share/bfg/bfg.jar .local/bin/rke .local/bin/docker-machine .loc
$(download) 'https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST' $(download) 'https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST'
.local/bin/rke: .local/bin/rke:
$(download) https://github.com/rancher/rke/releases/download/v0.2.0/rke_$(os)-$(arch) -$(download) https://github.com/rancher/rke/releases/download/v0.2.0/rke_$(os)-$(goarch)
chmod +x $@ -chmod +x $@
.local/bin/docker-machine: .local/bin/docker-machine:
$(download) "https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-$(os)-$$(uname -m)" -$(download) "https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-$(os)-$(arch)"
chmod +x $@ -chmod +x $@
.local/bin/packer: .local/bin/packer:
$(curl) https://releases.hashicorp.com/packer/1.3.5/packer_1.3.5_$(os)_$(arch).zip --output $(tempdir)/packer.zip $(curl) https://releases.hashicorp.com/packer/1.3.5/packer_1.3.5_$(os)_$(goarch).zip --output $(tempdir)/packer.zip
unzip -d $(tempdir) $(tempdir)/packer.zip unzip -d $(tempdir) $(tempdir)/packer.zip
install -m 755 $(tempdir)/packer $@ install -m 755 $(tempdir)/packer $@
rm $(tempdir)/packer* rm $(tempdir)/packer*
.local/bin/terraform: .local/bin/terraform:
$(curl) https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_$(os)_$(arch).zip --output $(tempdir)/terraform.zip $(curl) https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_$(os)_$(goarch).zip --output $(tempdir)/terraform.zip
unzip -d $(tempdir) $(tempdir)/terraform.zip unzip -d $(tempdir) $(tempdir)/terraform.zip
install -m 755 $(tempdir)/terraform $@ install -m 755 $(tempdir)/terraform $@
rm $(tempdir)/terraform* rm $(tempdir)/terraform*
.local/bin/vault: .local/bin/vault:
$(curl) https://releases.hashicorp.com/vault/1.1.0/vault_1.1.0_$(os)_$(arch).zip --output $(tempdir)/vault.zip $(curl) https://releases.hashicorp.com/vault/1.1.0/vault_1.1.0_$(os)_$(goarch).zip --output $(tempdir)/vault.zip
unzip -d $(tempdir) $(tempdir)/vault.zip unzip -d $(tempdir) $(tempdir)/vault.zip
install -m 755 $(tempdir)/vault $@ install -m 755 $(tempdir)/vault $@
rm $(tempdir)/vault* rm $(tempdir)/vault*
.local/bin/kubectl: .local/bin/kubectl:
$(download) "https://storage.googleapis.com/kubernetes-release/release/v1.13.4/bin/$(os)/$(arch)/kubectl" -$(download) "https://storage.googleapis.com/kubernetes-release/release/v1.13.4/bin/$(os)/$(goarch)/kubectl"
chmod +x $@ -chmod +x $@
.local/bin/kops: .local/bin/kops:
$(download) "https://github.com/kubernetes/kops/releases/download/1.11.1/kops-$(os)-$(arch)" -$(download) "https://github.com/kubernetes/kops/releases/download/1.11.1/kops-$(os)-$(goarch)"
chmod +x $@ -chmod +x $@
.local/bin/kompose: .local/bin/kompose:
$(download) https://github.com/kubernetes/kompose/releases/download/v1.17.0/kompose-$(os)-$(arch) -$(download) https://github.com/kubernetes/kompose/releases/download/v1.17.0/kompose-$(os)-$(goarch)
chmod +x $@ -chmod +x $@
.local/bin/minikube: .local/bin/minikube:
$(download) https://storage.googleapis.com/minikube/releases/latest/minikube-$(os)-$(arch) -$(download) https://storage.googleapis.com/minikube/releases/latest/minikube-$(os)-$(goarch)
chmod +x $@ -chmod +x $@
.local/bin/docker-machine-driver-kvm2: .local/bin/docker-machine-driver-kvm2:
$(download) https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 -$(download) https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2
chmod +x $@ -chmod +x $@
.local/bin/helm: .local/bin/helm:
$(curl) https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-$(os)-$(arch).tar.gz | tar -C .local/bin --wildcards --strip-components=1 -zx */helm mkdir -p $(tempdir)/helm
chmod +x $@ -$(curl) https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-$(os)-$(goarch).tar.gz | tar -zxf - -C $(tempdir)/helm/
-install -m 755 $(tempdir)/helm/$(os)-$(goarch)/helm $@
rm -r $(tempdir)/helm
.bash_completion.d/helm: .local/bin/helm .bash_completion.d/helm: .local/bin/helm
-$$(basename $@) completion bash > $@ -$$(basename $@) completion bash > $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment