diff --git a/quickstart.rb b/quickstart.rb index 5fd24f5..4aeb28d 100644 --- a/quickstart.rb +++ b/quickstart.rb @@ -1,4 +1,5 @@ require 'fileutils' +require 'Dir' class Quickstart < Formula v = "v0.1.0" @@ -20,15 +21,16 @@ class Quickstart < Formula end def install + FileUtils.mkdir_p(Dir.home + "/.config/kn/plugins") if OS.mac? FileUtils.mv("kn-quickstart-darwin-amd64", "kn-quickstart") else FileUtils.mv("kn-quickstart-linux-amd64", "kn-quickstart") end - bin.install "kn-quickstart" + FileUtils.ln_s("kn-quickstart", Dir.home + "/.config/kn/plugins/kn-quickstart") end test do - system "#{bin}/kn-quickstart", "version" + system "kn", "quickstart", "version" end end