From c4b6ad9517d55628d0c4c90286d3f724084314d4 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Tue, 25 Apr 2017 12:58:58 -0700 Subject: [PATCH] Add a homebrew formula Signed-off-by: Ahmet Alp Balkan --- Formula/kubectx.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Formula/kubectx.rb diff --git a/Formula/kubectx.rb b/Formula/kubectx.rb new file mode 100644 index 0000000..aa1cd60 --- /dev/null +++ b/Formula/kubectx.rb @@ -0,0 +1,24 @@ +class Kubectx < Formula + desc "Tool that can switch between kubectl contexts easily and create aliases" + homepage "https://github.com/ahmetb/kubectx" + url "https://github.com/ahmetb/kubectx/archive/v0.1.zip" + sha256 "3d014027e38c476164638b2138f190c43fd65a22ec50035c36926555233247c0" + + bottle :unneeded + + def install + bin.install "kubectx" + bash_completion.install "completion/kubectx.bash" => "kubectx" + end + + test do + system "kubectx", "--help" + end + + def caveats; <<-EOS.undent + To install zsh completion, add this to your .zshrc: + + [ -f /usr/local/etc/bash_completion.d/kubectx ] && source /usr/local/etc/bash_completion.d/kubectx + EOS + end +end