diff options
author | Franck Cuny <franck@fcuny.net> | 2021-09-08 19:57:31 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2021-09-08 19:57:31 -0700 |
commit | b6e4d2ad6a46d490340c52ef716d763ca416ed57 (patch) | |
tree | d9b047e59149f2cf52f4405c3da85212733d8c66 /Makefile | |
parent | linux: remove configurations specific to linux (diff) | |
download | emacs.d-b6e4d2ad6a46d490340c52ef716d763ca416ed57.tar.gz |
Makefile: simplify the setup
Diffstat (limited to '')
-rw-r--r-- | Makefile | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/Makefile b/Makefile index 4ff03ea..0d69c4a 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,42 @@ -OS := $(shell uname -s) - +XDG_CONFIG=$(HOME)/.config/ +WORKSPACE=$(HOME)/workspace LN = @ln -sf -.PHONY: install-general -install-general: - @mkdir -p $(HOME)/.config - @mkdir -p $(HOME)/workspace/ - @curl -s https://github.com/fcuny.keys -o $(HOME)/.ssh/authorized_keys +.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 - $(LN) $(PWD)/config/git $(HOME)/.config/ - $(LN) $(PWD)/emacs $(HOME)/.config/ - $(LN) $(PWD)/tmux.conf $(HOME)/.tmux.conf + +.PHONY: zsh +zsh: $(LN) $(PWD)/zshenv $(HOME)/.zshenv $(LN) $(PWD)/zshrc $(HOME)/.zshrc - @git config --local user.email "franck@fcuny.net" - @git config --local user.name "Franck Cuny" + +.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: @@ -24,3 +46,9 @@ check-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 |