install 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env 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 ${XDG_CONFIG_HOME:=$HOME/.config}
  8. echo "Prepared."
  9. # Initialise submodules
  10. (cd ~/dotfiles && git submodule sync && git submodule update --init)
  11. # Git config
  12. git config --global color.ui true
  13. git config --global core.editor vim
  14. git config --global core.excludesfile ~/dotfiles/git/globalignore
  15. git config --global diff.mnemonicPrefix true
  16. echo "Git config done."
  17. # Bash
  18. ~/dotfiles/bin/linkup ~/dotfiles/shell/bash_profile ~/.bash_profile
  19. ~/dotfiles/bin/linkup ~/dotfiles/shell/bashrc ~/.bashrc
  20. # Zsh
  21. ~/dotfiles/bin/linkup ~/dotfiles/shell/env ~/.zshenv
  22. ~/dotfiles/bin/linkup ~/dotfiles/shell/zshrc ~/.zshrc
  23. # Tmux
  24. ~/dotfiles/bin/linkup ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
  25. # Ack
  26. ~/dotfiles/bin/linkup ~/dotfiles/ack/ackrc ~/.ackrc
  27. # Vimperator
  28. ~/dotfiles/bin/linkup ~/dotfiles/vimperator ~/.vimperator
  29. ~/dotfiles/bin/linkup ~/dotfiles/vimperator/vimperatorrc ~/.vimperatorrc
  30. # Vim
  31. ~/dotfiles/bin/linkup ~/dotfiles/vim ~/.vim
  32. ~/dotfiles/bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
  33. ~/dotfiles/bin/linkup ~/dotfiles/vim $XDG_CONFIG_HOME/nvim
  34. # Use barebones config to avoid vimrc errors on fresh dotfiles installs.
  35. vim -N -u ~/dotfiles/vim/plugins.vim +PlugClean! +PlugUpdate! +quitall!
  36. echo "Install complete!"