aboutsummaryrefslogtreecommitdiff
path: root/kontext.rb
diff options
context:
space:
mode:
authorChristian Segundo2023-10-07 05:39:21 +0200
committerChristian Segundo2023-10-07 05:39:21 +0200
commit7e26c9c8121b0da07b96eb652f496e0e565e3b10 (patch)
treec8f3f9b5428cda709d8f79146674ce25522060ba /kontext.rb
parent26487b1400fd8b069f688d73e0d91dde2f4e01f1 (diff)
downloadhomebrew-tap-7e26c9c8121b0da07b96eb652f496e0e565e3b10.tar.gz
add kontext
Diffstat (limited to 'kontext.rb')
-rw-r--r--kontext.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/kontext.rb b/kontext.rb
new file mode 100644
index 0000000..efc9118
--- /dev/null
+++ b/kontext.rb
@@ -0,0 +1,33 @@
+class Kontext < Formula
+ desc "Per shell Kubernetes contexts"
+ homepage "https://git.segundo.io/Kubernetes/kontext/about/"
+ url "https://git.segundo.io/Kubernetes/kontext/snapshot/kontext-1.0.0.tar.gz"
+ sha256 "6e93389144c55dbafa08502e7c6a77775d4d4b9c769b8de5a9296c7947ef3bbf"
+ license :cannot_represent
+ head " https://git.segundo.io/Kubernetes/kontext", branch: "master"
+
+ depends_on "gnu-getopt"
+ depends_on "kubernetes-cli"
+ depends_on "autoconf" => :build
+ depends_on "automake" => :build
+
+ def install
+ system "aclocal"
+ system "autoconf"
+ system "automake", "--add-missing"
+ system "./configure", "--prefix=#{prefix}"
+ system "make", "install"
+ end
+
+ def caveats
+ <<~EOS
+ You must add the following alias to your shell:
+ alias kontext='source kontext'
+ EOS
+ end
+
+ test do
+ assert_match "kontext is not being sourced", shell_output("#{bin}/kontext --help 2>&1", 1)
+ assert_match "found in the kontext(1) man page", shell_output("bash -c 'source #{bin}/kontext --help 2>&1'", 1)
+ end
+end