install 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. # vim: set sw=2 ts=2 sts=2 et tw=80 fmr={{{,}}} fdl=0 fdm=marker:
  3. set -euo pipefail
  4. IFS=$'\n\t'
  5. # dotfiles installer for when `make` is not available.
  6. # Prep tasks
  7. mkdir -p ~/.ssh ${XDG_CONFIG_HOME:=$HOME/.config}
  8. touch ~/.ssh/known_hosts
  9. echo "Preparing."
  10. # Initialise submodules
  11. (cd ~/dotfiles && git submodule sync && git submodule update --init)
  12. echo "Submodules done."
  13. # Git config
  14. git config --global color.ui true
  15. git config --global core.editor vim
  16. git config --global core.excludesfile ~/dotfiles/git/globalignore
  17. git config --global diff.mnemonicPrefix true
  18. echo "Git config done."
  19. # Zsh
  20. ~/dotfiles/bin/linkup ~/dotfiles/zsh/zshenv ~/.zshenv
  21. ~/dotfiles/bin/linkup ~/dotfiles/zsh/zshrc ~/.zshrc
  22. echo "Zsh linked."
  23. # Tmux
  24. ~/dotfiles/bin/linkup ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
  25. echo "Tmux linked."
  26. # Ack
  27. ~/dotfiles/bin/linkup ~/dotfiles/ack/ackrc ~/.ackrc
  28. echo "Ack linked."
  29. # Vimperator
  30. ~/dotfiles/bin/linkup ~/dotfiles/vimperator ~/.vimperator
  31. ~/dotfiles/bin/linkup ~/dotfiles/vimperator/vimperatorrc ~/.vimperatorrc
  32. echo "Vimperator linked."
  33. # Vim
  34. ~/dotfiles/bin/linkup ~/dotfiles/vim ~/.vim
  35. ~/dotfiles/bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
  36. ~/dotfiles/bin/linkup ~/dotfiles/vim $XDG_CONFIG_HOME/nvim
  37. echo "Vim linked."
  38. # vim-plug install process. Starts with plugin list and `nocompatible` flag.
  39. vim -u ~/dotfiles/vim/plugins.vim -N +PlugClean! +PlugUpdate! +quitall!
  40. echo "Vim plugins done."
  41. echo "Install complete!"