Skip to content

Instantly share code, notes, and snippets.

@neocoin
Created April 6, 2020 03:14
Show Gist options
  • Save neocoin/a55c5580a1626511c3f0589be908925d to your computer and use it in GitHub Desktop.
Save neocoin/a55c5580a1626511c3f0589be908925d to your computer and use it in GitHub Desktop.
brew Formula for zinit
class Zinit < Formula
desc "Ultra-flexible Zsh plugin manager with clean fpath, reports, completion management, Turbo, annexes, services, packages. https://zdharma.org/zinit/wiki/"
homepage "https://github.com/zdharma/zinit"
url "https://github.com/zdharma/zinit.git"
version 'master'
def install
package = Pathname('zinit')
FileUtils.mkdir_p package
Dir['{*,.*}'].reject{|i| [package.to_s, '.', '..'].any?{|j| j == i}}.each{|i| FileUtils.mv i, package}
libexec.install package
end
def post_install
system "mkdir -p ~/.zinit"
system "ln -sf #{libexec / "zinit"} ~/.zinit/bin"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment