Created
April 6, 2020 03:14
-
-
Save neocoin/a55c5580a1626511c3f0589be908925d to your computer and use it in GitHub Desktop.
brew Formula for zinit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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