Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384symlinks = \ bundle \ config \ local \ gemrc \ gitconfig \ gitignore \ tool-versions \ vimrc \
default: | update clean
install: | ln brew ruby vim_plug fisher
update: | install brew upgrade gem update fish -c "fisher update" vim +PlugUpgrade +PlugInstall +PlugUpdate +qall
clean: | install brew cleanup gem clean vim +PlugClean +qall
# brew
brew: | $(homebrew)
homebrew_root = /opt/homebrewhomebrew = $(homebrew_root)/bin/brew$(homebrew): @/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /opt/homebrew/bin/brew bundle --file=$(PWD)/Brewfile
# ln
prefixed_symlinks = $(addprefix $(HOME)/.,$(symlinks))ln: | $(prefixed_symlinks)
$(prefixed_symlinks): @ln -Fsv $(PWD)/$(patsubst .%,%,$(notdir $@)) $@
# ruby
ruby_version := $(shell cat $(PWD)/tool-versions | awk -v tool=ruby '$$1 == tool { print $$2 }')
ruby_versions = $(HOME)/.asdf/installs/rubyruby = $(ruby_versions)/$(ruby_version)
bundler = $(ruby)/bin/bundle
ruby: | $(ruby) $(bundler)
$(ruby): | $(brew) $(HOME)/.tool-versions asdf plugin add ruby asdf install ruby $(ruby_version)
gem = $(ruby)/bin/gem
$(bundler): | $(ruby) $(gem) install bundler
# vim
vim_plug = $(HOME)/.vim/autoload/plug.vimvim_plug: | $(vim_plug)
$(vim_plug): curl -fLo $(vim_plug) --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim mkdir -p $(HOME)/.vim/tmp
# fisherfisher = $(HOME)/.config/fish/functions/fisher.fishfisher: | $(fisher)
$(fisher): @/opt/homebrew/bin/fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
# make
.PHONY: update