summaryrefslogblamecommitdiff
path: root/Makefile
blob: 0d69c4a7b33eb089ace1f59e625e5e09d57e2f0d (plain) (tree)
1
2
3
4

                           
            
 












                                                             
                                                         


           

                                           















                                                                              
 
                  

                                                                           
 
                  

                                                                            
 





                                                                 
XDG_CONFIG=$(HOME)/.config/
WORKSPACE=$(HOME)/workspace
LN = @ln -sf

.PHONY: xdg_config
xdg_config:
	@mkdir -p $(XDG_CONFIG)

.PHONY: go
go:
	@go install golang.org/x/tools/gopls@latest
	@go install honnef.co/go/tools/cmd/staticcheck@latest
	@go install github.com/go-delve/delve/cmd/dlv@latest

.PHONY: emacs
emacs: xdg_config git go
	$(LN) $(PWD)/emacs $(XDG_CONFIG)
	$(LN) $(PWD)/aspell.en.pws $(HOME)/.aspell.en.pws

.PHONY: zsh
zsh:
	$(LN) $(PWD)/zshenv $(HOME)/.zshenv
	$(LN) $(PWD)/zshrc $(HOME)/.zshrc

.PHONY: git
git: xdg_config
	$(LN) $(PWD)/config/git $(XDG_CONFIG)

.PHONY: tmux
tmux:
	$(LN) $(PWD)/tmux.conf $(HOME)/.tmux.conf

.PHONY: workspace
workspace:
	@mkdir -p $(WORKSPACE)

.PHONY: ssh
ssh:
	@curl -s https://fcuny.net/ssh.pub.sig -o $(HOME)/.ssh/authorized_keys

.PHONY: check-dead
check-dead:
	@find ~ -maxdepth 1 -name '.*' -type l -exec test ! -e {} \; -print

.PHONY: clean-dead
clean-dead:
	@find ~ -maxdepth 1 -name '.*' -type l -exec test ! -e {} \; -delete

.PHONY: setup
setup:
	@git config --local user.email "franck@fcuny.net"
	@git config --local user.name "Franck Cuny"

all: setup xdg_config workspace emacs zsh git tmux ssh check-dead