aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-25 14:33:06 +0200
committerMattias Andrée <maandree@kth.se>2021-06-25 14:33:06 +0200
commit564263512e6425ae68ef431350edcfde8a3f1075 (patch)
tree2e483266b85a032d7425ec838dd7ac0283dd19c5 /emacs/Makefile
parentFirst commit (diff)
downloaddotfiles-564263512e6425ae68ef431350edcfde8a3f1075.tar.gz
dotfiles-564263512e6425ae68ef431350edcfde8a3f1075.tar.bz2
dotfiles-564263512e6425ae68ef431350edcfde8a3f1075.tar.xz
Use asroot instead of sudo and add emacs configs
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--emacs/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/emacs/Makefile b/emacs/Makefile
new file mode 100644
index 0000000..3a5a47d
--- /dev/null
+++ b/emacs/Makefile
@@ -0,0 +1,28 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config
+ if test -d ~/.emacs.d; then \
+ test ! -e ~/.config/emacs && \
+ mv -- ~/.emacs.d ~/.config/emacs; \
+ else \
+ mkdir -p -- ~/.config/emacs; \
+ fi
+ ln -sf -- .config/emacs ~/.emacs.d
+ printf '; %s\n\n' 'This file is generated by ~/.dotfiles/emacs/Makefile' > ~/.config/emacs/init.el
+ cat -- init.el >> ~/.config/emacs/init.el
+ if pacman -Qq emacs-go-mode </dev/null >/dev/null 2>/dev/null; then\
+ printf '\n' >> ~/.config/emacs/init.el && \
+ cat -- init-go-mode.el >> ~/.config/emacs/init.el; \
+ fi
+ if pacman -Qq emacs-haskell-mode </dev/null >/dev/null 2>/dev/null; then\
+ printf '\n' >> ~/.config/emacs/init.el && \
+ cat -- init-haskell-mode.el >> ~/.config/emacs/init.el; \
+ fi
+
+uninstall:
+ -unlink -- ~/.config/emacs/init.el
+ -unlink -- ~/.emacs.d
+ -rmdir -- ~/.config/emacs
+
+.PHONY: install uninstall